In this May 3, 2017, photo, Benjamin Elder, of Friendswood, Texas, plays with a "fidget spinner" as he is interviewed. Ben's mother, Ann, said her son, an 11-year-old transgender boy who was born a female would be singled out for discrimination should state lawmakers pass "a bathroom bill." Photo: (AP Photo/John L. Mone)

In this May 3, 2017, photo, Benjamin Elder, of Friendswood, Texas, plays with a "fidget spinner" as he is interviewed. Ben's mother, Ann, said her son, an 11-year-old transgender boy who was born a female would be singled out for discrimination should state lawmakers pass "a bathroom bill." Photo: (AP Photo/John L. Mone)

Each morning, Joanna Smith’s 7-year-old son pulls on a T-shirt and shorts, boasts how fast he can tie his sneakers and heads to school. An honor-roll student who loves science and spelling, he often stays after class to run on the playground with his large group of friends.

But teachers may soon have to disrupt his routine by revealing a secret: This energetic boy was born a girl. Legislation headed for passage in the Texas Legislature this month could forbid him from using the boys’ bathroom and effectively divulge his transgender identity to classmates.

“He would be very embarrassed and ashamed to be outed,” said Smith, who plans to pull her child out of school if the measure is adopted. “I worry so much that it would just ruin his life.” She spoke on the condition that her son’s name would not be used.

The measure poses an excruciating dilemma for Texas schools that have quietly agreed at parents’ requests to keep secret the birth genders of some students.

To comply with state law, teachers might have to send transgender students to the bathroom of their birth gender or to a single-occupancy bathroom, shocking their peers.

The legislation “really boxes in school systems,” said Raffi Freedman-Gurspan, a spokeswoman for the national transgender rights organization Trans Equality.

A broad bill requiring transgender individuals to use the restroom of their birth-certificate gender passed the Senate but stalled in the House. Supporters revived it late Sunday, advancing a proposal applying only to the state’s public schools, which educate about 5.3 million students. That’s the second-largest number in the U.S. after California.

The final details of the measure are still being worked out. A similar law in North Carolina was partially repealed this year after protests and boycotts. Comparable proposals have been offered in other legislatures, but none has been approved.

Currently, each school and school district determines how to handle students whose birth genders are secret — a small portion of Texas’ thousands of transgender minors. A survey conducted by the Williams Institute at UCLA indicated that 13,800 Texas teens identify as transgender, but the number of children under age 13 is not known.

Some districts have nondiscrimination policies that explicitly include gender identity. Others have no formal policy but still shield students on a case-by-case basis.

Faculty at Smith’s school declined to discuss their treatment of her son. But Lindsey Pollock, a principal in another school in the district, said she tries to stick up for children, even under legal and political pressure.

“This has never been an issue,” said Pollock, who said she has always allowed transgender students to use the bathroom of their choice in her 17 years as a principal. “The problem is the adults looking to make it a problem.”

Just last year, a transgender girl entered kindergarten in Pollock’s Garden Montessori elementary, asking to keep her background secret.