A federal judge on Tuesday temporarily blocked prison officials from transferring transgender women to men’s facilities and terminating their access to hormone therapy under an executive order signed by President Donald Trump.

U.S. District Judge Royce Lamberth, who was appointed by former Republican president Ronald Reagan, is presiding over a lawsuit filed on behalf of three transgender women who were housed in women’s facilities before Trump signed the order on his first day back in the White House on January 20.

He granted the inmates’ request for a temporary restraining order hours after a hearing where an attorney argued that Trump’s order discriminates against transgender people and violates their constitutional rights, The Associated Press reported.

“The request for a temporary restraining order is granted on the narrow grounds of the plaintiff’s Eighth Amendment claims,” Lamberth wrote in the ruling.

“Because the plaintiffs’ Eighth Amendment claims are sufficient unto themselves to sustain a TRO, this Court will take no position on the merits of the plaintiffs’ equal protect or [Administrative Procedure Act] claims at this time.”

This is a breaking news story and will be updated.

Trump transgender flag
The judge has halted Trump’s order for prison officials to transfer transgender women to men’s facilities.

karetoria/Getty Images/ROBERTO SCHMIDT/AFP via Getty Images