The U.S. District Court for the District of Columbia decided Monday that the Pentagon cannot enforce the Trump administration's ban on transgender troops.

The district court issued a preliminary injunction saying the military cannot bar transgender people from its ranks and must provide them medical care in a decision transgender advocates called a "colossal victory," Politico reports.

The decision deals a blow to President Donald Trump's July announcement on Twitter that transgender individuals would not be allowed to serve "in any capacity in the U.S. military." The Department of Defense issued interim guidance in response to the president's announcement and following memorandum, clarifying that currently serving transgender service members would continue to serve in the U.S. military pending further study on the issue.

The guidance said the Defense Department first and foremost would continue to "treat every service member with dignity and respect."

The administration of former President Barack Obama first allowed transgender Americans to serve openly in the military in 2015.