South Dakota Governor Dennis Daugaard vetoed a bill Tuesday that would have barred transgender students from using school bathrooms that correspond to their gender identities. Had Daugaard signed the bill, South Dakota would have been the only state in the union to pass such a law.

The governor met with trans students and with conservative lawmakers who supported the bill before making his decision. It seems improbable that Daugaard, a Republican who fought against gay marriage and supported a ballot measure that would have banned abortion outright in his state, had a sudden change of heart about civil rights. Much more likely is that he wanted to avoid a legal battle with the federal government, which holds that restricting bathroom access violates federal sex discrimination laws.

“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 in a statement to state legislators about his decision.

It’s uncertain whether this is a permanent victory for South Dakota’s trans community or a temporary one. When the New York Times asked Fred Deutsch, the lawmaker who introduced the bill, whether he planned to push similar legislation again next year, he said he wasn’t sure. “I’ve talked to legislators from many states who want to do something similar to this,” he added.

Image via AP. Contact the author at andy@gawker.com.