SAN DIEGO — Transgender troops testifying for the first time to Congress on Wednesday said transitioning to another sex made them stronger, while Pentagon officials defended the Trump administration’s desire to bar people like them from enlisting in the future.

Army Capt. Alivia Stehlik, an infantry officer and graduate of the U.S. Military Academy at West Point, N.Y. and Ranger School, told lawmakers she became a more "effective soldier" after she transitioned from male to female in 2016.

"What is the value of having transgender people in the military? Based on my experience first as a combat arms officer and medical provider, the answer is unequivocally that my transition — and so many others — has dramatically increased the readiness and lethality of every branch of the armed forces," said Stehlik, who returned from a deployment to Afghanistan a month ago where she treated soldiers as a physical therapist.

With the ban now blocked by lawsuits, active-duty transgender service members were invited to testify about their service at the hearing called by Democratic Rep. Jackie Speier, chairwoman of the subcommittee.

Speier said the ban is "discriminatory, unconstitutional and self-defeating" and said lifting the barrier for transgender people to serve by the Obama administration in 2016 has been an "unequivocal success."

She added that barring transgender people "would cost us recruits at a time when so few Americans are willing to serve." She called the five transgender troops who testified Wednesday "exceptional, but also exceptionally normal."

Retired Air Force Gen. James N. Stewart, who is now performing the duties of the undersecretary of defense for personnel and readiness, defended the Trump administration’s policy, which is currently blocked by litigation.

He said current transgender troops will be allowed to continue to serve and other transgender people can join the military if they serve in their biological sex and have not been diagnosed with gender dysphoria, a condition under which people experience distress if they do not identify with their birth gender.

"It's not a ban on transgender individuals," he insisted.

Stewart added that "special accommodations" cannot be made for people with such a medical condition.

From left, transgender military members Navy Lt. Cmdr. Blake Dremann, Army Capt. Alivia Stehlik, Army Capt. Jennifer Peace, Army Staff Sgt. Patricia King and Navy Petty Officer Third Class Akira Wyatt, prepare for the House Armed Services Subcommittee on Military Personnel hearing on Capitol Hill in Washington, Wednesday, Feb. 27, 2019, as the Trump administration pushes to ban transgender troops. This is the first ever hearing that transgender military members openly testified in Congress. (Manuel Balce Ceneta/AP)
From left, transgender military members Navy Lt. Cmdr. Blake Dremann, Army Capt. Alivia Stehlik, Army Capt. Jennifer Peace, Army Staff Sgt. Patricia King and Navy Petty Officer Third Class Akira Wyatt, prepare for the House Armed Services Subcommittee on Military Personnel hearing on Capitol Hill in Washington, Wednesday, Feb. 27, 2019, as the Trump administration pushes to ban transgender troops. This is the first ever hearing that transgender military members openly testified in Congress. (Manuel Balce Ceneta/AP)

Maryland Democrat Anthony Brown said the same argument was used to keep blacks from integrating into the Army in 1948 and again in the 1990s to keep gay people from serving openly under the don't ask, don't tell policy, which was repealed by Congress in 2010.

He said barring people who have undergone treatment for gender dysphoria and transitioned to another sex is equivalent to banning transgender people.

"You're transgender and only if you agree not to transition, then you can serve, that's just like 'don't ask, don't tell,'" he said.

In the nearly three years since the U.S. military welcomed transgender people into the armed forces, they have largely served without incident. Some, like Army attack helicopter pilot Lindsey Muller, have earned prestigious medals or received other forms of recognition.

"Once you meet transgender people who have served in the different branches ... it's really hard to dismiss the fact that you will find Purple Heart recipients, Bronze Star winners, attack aviators, Navy SEALs," said Muller, who did not testify but is a plaintiff in one of four lawsuits challenging the ban. "We've been here, and we will continue to be here regardless. In what capacity is up to the administration."

This undated photo provided by her wife Jessica Kibodeaux shows Lindsey Muller and her dog Emma hiking in the Cheyenne Mountains west of Fort Carson, Colo. Muller, a 19-year combat veteran who served multiple tours in Iraq, diligently followed the Pentagon guidelines to transition. In the nearly three years since the U.S. military welcomed transgender people into the armed forces in 2016, they have served without incident. Some, like Muller, have earned prestigious medals or received other forms of recognition. (Jessica Kibodeaux via AP)
This undated photo provided by her wife Jessica Kibodeaux shows Lindsey Muller and her dog Emma hiking in the Cheyenne Mountains west of Fort Carson, Colo. Muller, a 19-year combat veteran who served multiple tours in Iraq, diligently followed the Pentagon guidelines to transition. In the nearly three years since the U.S. military welcomed transgender people into the armed forces in 2016, they have served without incident. Some, like Muller, have earned prestigious medals or received other forms of recognition. (Jessica Kibodeaux via AP)

President Donald Trump has argued that their presence is a burden and cited "tremendous medical costs" as a reason for the ban.

According to new data from the Defense Department provided to the House Armed Services Committee ahead of the hearing, the military has spent about $8 million on transgender care since 2016. The military's annual health care budget tops $50 billion. The Associated Press obtained the data Wednesday.

An estimated 14,700 troops on active duty and in the Reserves identify as transgender but not all seek treatment.

Military chiefs testified before Congress last year that they found no problems with transgender troops on morale or unit cohesion. The five fransgender troops who testified Wednesday said their medical transitions took anywhere from four weeks to four months and they did most of it on their own time.

They said recovery from pregnancy and shoulder surgery takes much longer.

The Defense Department treated 1,525 service members between July 1, 2016, and February 1, 2019, who were diagnosed with gender dysphoria. Currently about 1,071 are serving, including 20 senior officers.

The military spent about $8 million on transgender care, including about $5.8 million on psychotherapy and about $2 million on surgeries mostly for breast reductions and hysterectomies. There were about 23,000 psychotherapy visits and about 160 surgeries.

Mississippi Rep. Trent Kelly, the committee’s ranking Republican member, said not everyone can join the military because of its “stringent medical and behavioral health standards needed to maintain a ready and resilient force. However, it only makes sense that any individual who can meet these standards and is otherwise qualified should be allowed to serve.”