Advocates gathered at the South Dakota Capitol in February to urge a veto on HB 1008, a bill to restrict transgender students’ access to school bathrooms and locker rooms. (Jay Pickthorn/Argus Leader via AP)

South Dakota Gov. Dennis Daugaard (R) has vetoed a bill that would have been the first in the nation to restrict transgender students’ access to school restrooms and locker rooms, a move that came after LGBT rights activists waged a furious campaign against the measure.

In a message to state lawmakers announcing his veto, Daugaard said that the bill would have introduced a new statewide mandate that “does not address any pressing issue concerning the school districts of South Dakota.”

“Instead of encouraging local solutions, this bill broadly regulates in a manner that invites conflict and litigation, diverting energy and resources from the education of the children of this state,” Daugaard wrote, emphasizing that local school districts should be able to decide how to handle questions about bathroom use without interference from the state or federal government.

Daugaard’s decision came days after meeting with transgender youth to hear their personal stories and their reasons for opposing the bill, which would have required that students use the public school restrooms that correspond with their biological sex instead of their gender identity. Transgender students would have been allowed under the bill to ask their schools for “reasonable accommodations,” such as a single-stall teachers’ bathroom.

He announced the veto just hours before a deadline to act on the bill.

Had it been enacted, the South Dakota law would have been in direct conflict with federal civil rights policy, and schools could have faced the possibility of losing millions of dollars in federal funding.

The president of the nation’s largest LGBT rights organization cheered the governor’s decision. “Today, the voices of fairness and equality prevailed, and these students’ rights and dignity prevailed against overwhelming odds and vicious opponents in the state legislature,” said Chad Griffin, president of the Human Rights Campaign.

Proponents of the legislation, including its sponsor, state Rep. Fred Deutsch (R), say that it is necessary in order to protect the privacy of all children in public schools.

Deutsch said in an interview Tuesday evening that he is disappointed by the governor’s decision but will not try to persuade his colleagues to override the veto. He said he would like to introduce a similar measure next year if he can address the governor’s concerns.

“It’s very simple: Boys in the boys’ shower. Girls in the girls’ shower. Accommodation for students who are transgender,” Deutsch said, adding that he has been glad to see his bill attract attention outside the state. “Maybe this was all about starting a national conversation.”

The American Civil Liberties Union, the Human Rights Campaign and other LGBT rights activists had been fighting the South Dakota bill, calling it a bigoted effort to target some of the country’s most vulnerable children. Some businesses and child-welfare groups also had voiced concern about the measure.

“Transgender students like me are just looking for a chance to access the same things that everyone else does — an education, a job, a safe place to pee,” Thomas Lewis, an 18-year-old transgender South Dakotan, wrote in an opinion piece published in The Washington Post. “Gov. Dennis Daugaard, please stand up for me and all of the people of South Dakota you represent. The country is watching, and history will show that you did the right thing if you veto this bad bill.”

The Obama administration has said that restricting transgender students’ access to bathrooms amounts to gender discrimination that is illegal under the federal civil rights law known as Title IX.

The administration’s position, hailed by transgender students and their advocates, has sparked a mounting backlash from parents, activists and lawmakers who call it an assault on traditional values and children’s privacy.

Besides South Dakota, 13 other states are considering legislation that would restrict transgender students’ bathroom access.

Lawmakers in Tennessee were scheduled to hold a hearing Tuesday on a bill that would require students to use the bathroom that corresponds to the sex listed on their birth certificate. Tennessee is the only state in the nation with a law banning people from changing the sex listed on their birth certificate, according to the ACLU.

Matt Sharp of the Alliance Defending Freedom, an organization that is pushing such legislation in many states, said Tuesday night that it is an important issue that will continue to pop up elsewhere.

“Other states are going to be looking at it as well, so I see it as one step in a much bigger battle to protect every student’s privacy in our country,” Sharp said.