HELENA, Mont. — The Republican governor of Montana, Greg Gianforte, signed a bill into law on Friday to restrict transition care for transgender minors, joining about a dozen states that have adopted similar laws since the beginning of the year.

The bill, which prohibits transitional hormone treatments and surgeries for transgender people under 18, led to a standoff this month between House leadership and Representative Zooey Zephyr, one of the Legislature’s only transgender lawmakers.

In a speech on the House floor last week, Ms. Zephyr told her conservative colleagues that the ban would put “blood on your hands,” and that denying transition care would be “tantamount to torture.” For days after, House leadership refused to call on Ms. Zephyr during discussion of any bill up for consideration before the House.

And on Wednesday, the Republican-controlled House took the extraordinary step of blocking her from the House floor for the remainder of the legislative session, which ends on May 5.

Ms. Zephyr called the decision to pass the law “unconscionable” and said it would harm transgender people across the state.

“It’s clear that anti-trans policies do not align with Montana’s values,” she said in a telephone interview. “We are a state that cares for its community. There are trans people through every community in this state.”

She said she believed the measure would be struck down in court, and the American Civil Liberties Union and other groups said they would be filing a lawsuit “to protect transgender youth in Montana from being stripped of access to health care that keeps them healthy and alive.”

The bill was also opposed by Mr. Gianforte’s son, David Gianforte, who identifies as nonbinary and had asked his father to reject what he called “immoral, unjust” bills backed by Republicans.

The governor did not speak publicly on the bill on Friday, but his office issued a brief statement.

“He is committed to protecting Montana’s children from invasive medical treatments that can permanently alter their healthy, developing bodies,” the governor’s spokeswoman, Kaitlin Price, said in an email.

Representative Kim Abbott, the House Democratic leader, confirmed the adoption of the bill Friday afternoon over her party’s opposition.

“I’m very disappointed it’s becoming law,” she said in an interview. “It is very damaging policy. It impacts families and communities who are trying to obtain medically necessary care.”

The bill was first sent to the governor’s desk last week. But Mr. Gianforte sent it back to lawmakers with amendments, along with a letter noting that gender-affirming care was a misleading term and comparing it to “Orwellian Newspeak.”

Republican legislators have characterized transition care as harmful and experimental, arguing that young people should not be allowed to begin medically transitioning before they become adults. But major medical organizations, including the American Academy of Pediatrics, support this care and say that bans pose serious mental health risks to young people.

The bill signed on Friday, Senate Bill 99, was just one of a slate of measures focused on gender identity that the Montana legislature has been advancing this month, including one that would define sex in binary terms and one that would bar public school students from changing their pronouns without parental permission.

Another bill that was signed by the governor this week makes it harder for public school students to be disciplined for misgendering their nonbinary or transgender peers.

Montana politics, which once had a competitive mix of Democrats and Republicans, have become much more conservative in recent years. Mr. Gianforte, a Republican, is a wealthy former software executive.

Over the past few years, Republican state lawmakers across the country have introduced a wave of bills to regulate the lives of transgender youths by restricting the bathrooms they can use, the sports teams they can join and the medical care they can receive. These efforts have been particularly aggressive since the start of the 2023 legislative season.

Mike Baker contributed reporting.