A federal judge on Wednesday blocked a first-of-its-kind Arkansas law that bans gender-affirming care for transgender youth.

The law was set to take effect on Wednesday, July 28.

U.S. District Judge James Moody Jr., an Obama appointee, ruled from the bench after hearing oral arguments in a lawsuit filed by the American Civil Liberties Union (ACLU).

Plaintiffs in the lawsuit, Brandt et al v. Rutledge et al, are four transgender youth and their families and two doctors.

“Today’s victory is a testament to the trans youth of Arkansas and their allies, who never gave up the fight to protect access to gender-affirming care and who will continue to defend the right of all trans people to be their authentic selves, free from discrimination,” said Holly Dickson, executive director of the ACLU of Arkansas. “We won’t rest until this cruel and unconstitutional law is struck down for good.”

Under the law, doctors are prohibited from providing gender reassignment surgery, hormones, or puberty blockers to minors. Doctors who violate the law can be sued for damages or professionally sanctioned.

Transgender advocates point out that surgery is generally not an option for minors.

Governor Asa Hutchinson, a Republican, vetoed the bill, known as House Bill 1570, in March but lawmakers overwhelmingly overrode his decision.