The Republican state representative who introduced the legislation, Fred Deutsch, absurdly argued that it was intended to “protect the innocence of children.” He acknowledged that there was no evidence that allowing transgender students to use the restroom of their choice — as thousands do across the country every day — had harmed anyone’s safety or morality. The bill, Mr. Deutsch told a Times reporter, is “entirely preventative.”

If this bill became law, it would put South Dakota at the forefront of a legal and cultural fight that has gained national prominence as more transgender people have chosen to live openly. The state would have to pay a high price for its backward policy.

For starters, the law would jeopardize federal funding for public schools in the state. The Department of Education has established that under a federal civil rights law known as Title IX, schools must allow transgender students to use restrooms based on their gender identity. The department’s Office for Civil Rights has conducted investigations, and reached settlements, after a handful of school districts adopted discriminatory restroom policies similar to the one Mr. Daugaard is considering for the entire state.

Far from protecting anyone, the law would stigmatize students who are already vulnerable to bullying and assault. And it would put educators in an absurd position when it comes to enforcement.

Mr. Daugaard recently said he had never knowingly met a transgender person. Kendra Heathscott, a transgender woman from Sioux Falls, wrote the governor a letter to let him know he actually had. The two met when Ms. Heathscott was a 10-year-old student, who was struggling with school and bullies, and found refuge at the Children’s Home Society, a human services organization that Mr. Daugaard ran at the time.