The South Dakota House on Wednesday evening passed legislation that would ban physicians in the state from treating transgender children with hormones and sex reassignment surgery.

The Republican-controlled chamber passed H.B. 1057 in a 46-23 vote. Under the proposed law, doctors would receive misdemeanor charges if they are caught giving transgender children under 16 years old hormone treatment. The bill also bans them from performing "castration" or vasectomies on children in that age range.

State Rep. Fred Deutsch (R), the primary sponsor of the bill, tweeted that after "some of the heaviest lobbying," the legislature finally passed a bill to "protect gender confused children."

On Tuesday, Duetsh backtracked on a statement he made comparing medical treatment for transgender children to Nazi "experiments."

The bill will be sent to the state Senate as soon as next week. In a statement, the ACLU of South Dakota said that it is ready to challenge the law in court if it passes.

"By blocking medical care supported by every major medical association, the legislature is compromising the health of trans youth in dangerous and potentially life-threatening ways," said Libby Skarin, policy director for the ACLU of South Dakota, in a statement.

South Dakota is the first state in the nation to take action on such a law this year, though bills have been filed in state legislatures across the nation that would restrict medical intervention for transgender youth.

"Discrimination against a marginalized group is a distraction from the state's real needs and hurts us all," the statement added. "Transgender young people live in our state and need to feel like the government represents them, too. The more we legislate solutions in search of problems, the more our communities suffer."