DES MOINES, Iowa (AP) — A state court judge has dismissed a lawsuit filed in May challenging a new state law that prohibits the use of Medicaid funding for gender reassignment surgery.

Judge David Porter says in an order filed Thursday that the two people who filed the lawsuit must first seek to have their surgeries approved by the Iowa Department of Human Services through Medicaid and follow an administrative appeals process.

He says it’s premature to sue before DHS is given an opportunity to amend or repeal its rules.

He also denied a request to put the law on hold while legal issues are pending.

The American Civil Liberties Union of Iowa represents Mika Covington and Aiden Vasquez who are seeking to have gender reassignment surgeries.

The ACLU quickly appealed the judge’s decision to the Iowa Supreme Court.

The court ruled in March in a different case that the Iowa DHS cannot block Medicaid-paid gender reassignment surgeries.

Republican lawmakers and Gov. Kim Reynolds responded to the ruling by passing the new law.