Army Staff Sgt. Joshua Gravett, center, is honored with David...

Army Staff Sgt. Joshua Gravett, center, is honored with David Kilmnick, LGBT Network CEO, and New York Mets pitcher Steven Matz on Pride Night at Citi Field on Saturday, Aug. 13, 2016. The recognition came during a Mets game with the San Diego Padres. Credit: Kathleen Malone-Van Dyke

During Army Staff Sgt. Joshua B. Gravett’s 2005 first combat tour in Afghanistan, he carried an M4 service rifle and a secret — that he was serving in the military as a gay man.

Saturday, he stood in his Army dress uniform on the edge of the infield grass at Citi Field as nearly 37,000 fans — many of them chanting “U.S.A.!” — cheered his participation in a New York Mets salute to gay pride.

“This is awesome,” said Gravett, 30, an Army recruiter based at the Armed Forces center in the Selden Plaza mall.

Until relatively recently, Gravett and tens of thousands of gay, lesbian, bisexual and transgender people serving in the nation’s military mostly hid their sexual orientation in conformance with a Pentagon policy of banning gays and lesbians.

That began to change in 2011, when President Barack Obama ended the policy, known as “don’t ask, don’t tell.”

“It was a part of your life that you just had to keep secret,” Gravett said Saturday night before his participation in the Mets recognition of the LGBT community at Citi Field, during the game against the San Diego Padres.

“It was a witch hunt during ‘don’t ask, don’t tell,’ ” Gravett said. “If they found out you were gay, you would get kicked out.”

That former military policy barred openly gay, lesbian or bisexual people from joining or serving in the military, even as it theoretically protected those who did not make their sexual identity public. As the policy was being considered in the early 1990s, scores of officers, including former Marine Corps Commandant Gen. Carl E. Mundy Jr., argued that gay troops would be a distraction, a moral threat to younger soldiers or even a vector for the AIDS virus.

Critics of “don’t ask, don’t tell,” which was implemented by President Bill Clinton in 1994, said it forced members of the military to lie about a basic element of themselves. They said the armed forces of most Western nations, including NATO partners Britain, France and Germany, had successfully integrated gay men and lesbians into their ranks, and forcing LGBT troops to hide their orientation deprived them of connections to loved ones, which military leaders have long considered a critical source of strength.

Obama, in ending the policy, certified to Congress that doing so would not harm the nation’s ability to field an effective military force.

An estimated 13,000 lesbian, gay and bisexual personnel serve in the active-duty U.S. military, according to a 2010 study by the Williams Institute of the UCLA School of Law. Nearly 60,000 more are in the National Guard and Reserves.

Organizations that represent LGBT service members and their families say the end of “don’t ask, don’t tell” has removed an often-debilitating source of anxiety for service members, who before lived in fear that discovery could end their career. Because same-sex marriages were not recognized, insurance coverage, death benefits and even child custody were constant worries.

“It has been an extremely positive change,” said Ashley Broadway, president of the American Military Partner Association, herself the spouse of a female Army lieutenant colonel, with whom she is raising a child. “More and more service members feel they can be out of the closet and come to work and share with their commanding officers when they ask about their family. Family is an important institution in the military.”

Gravett, who served a second combat tour in Afghanistan in 2012, said he realized he was gay years before he joined the Army in 2003, but kept it secret to conform with the military’s ban.

He said his decision to be open about his sexual identity has not harmed his ability to interact with his heterosexual colleagues.

“I’ve not lost one single friend since I’ve come out,” Gravett said. “I’m fortunate.”

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Sean 'Diddy' Combs indicted ... Can LI roads withstand more flooding? ... Legacy of 8-year-old's cancer fight ... Get the latest news and more great videos at NewsdayTV

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Sean 'Diddy' Combs indicted ... Can LI roads withstand more flooding? ... Legacy of 8-year-old's cancer fight ... Get the latest news and more great videos at NewsdayTV

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME