The US military cannot turn away enlistees who have HIV, a federal judge ruled Tuesday, striking down the final part of a controversial Pentagon approach to the condition that has been chipped away at in recent years.

US District Judge Leonie Brinkema said the Pentagon’s ban on HIV-positive people seeking to enlist in the armed forces contributes “to the ongoing stigma surrounding HIV-positive individuals while actively hampering the military’s own recruitment goals.”

“Modern science has transformed the treatment of HIV,” Brinkema wrote in her ruling, saying that “asymptomatic HIV-positive service members with undetectable viral loads who maintain treatment are capable of performing all of their military duties, including worldwide deployment.”

The Pentagon, she added, “must allow similarly situated civilians seeking accession into the United States military to demonstrate the same and permit their enlistment, appointment, and induction.”