After a high school production of “Oklahoma!” was halted in conservative Sherman, Texas, something unusual happened: The school board sided with transgender students.A school district in the conservative town of Sherman, Texas, made national headlines last week when it put a stop to a high school production of the musical “Oklahoma!” after a transgender student was cast in a lead role.The district’s administrators decided, and communicated to parents, that the school would cast only students “born as females in female roles and students born as males in male roles.” Not only did several transgender and nonbinary students lose their parts, but so, too, did cisgender girls cast in male roles. Publicly, the district said the problem was the profane and sexual content of the 1943 musical.At one point, the theater teacher, who objected to the decision, was escorted out of the school by the principal. The set, a sturdy mock-up of a settler’s house that took students two months to build, was demolished.But then something even more unusual happened in Sherman, a rural college town that has been rapidly drawn into the expanding orbit of Dallas to its south. The school district reversed course. In a late-night vote on Monday, the school board voted unanimously to restore the original casting. The decision rebuked efforts to bring the fight over transgender participation in student activities into the world of theater, which has long provided a haven for gay, lesbian and transgender students, and it reflected just how deeply the controversy had unsettled the town.The district’s restriction had been exceptional. Fights have erupted over the kinds of plays students can present, but few if any school districts appear to have attempted to restrict gender roles in theater. And while legislatures across the country, including in Texas, have adopted laws restricting transgender students’ participation in sports, no such legislation has been introduced to restrict theater roles, according to the National Conference of State Legislatures.Community members attend a school board meeting at the Sherman Independent School District on Monday night.Desiree Rios for The New York TimesThe board’s vote came after students and outraged parents began organizing. In recent days, the district’s administrators, seeking a compromise, offered to recast the students in a version of the musical meant for middle schoolers or younger that omitted solos and included roles as cattle and birds. Students balked.After the vote, the school board announced a special meeting for Friday to open an investigation and to consider taking action against the district superintendent, Tyson Bennett, who oversaw the district’s handling of “Oklahoma!,” including “possible administrative leave.”Suddenly, improbably, the students had won.“I’m beyond excited and everyone cried tears of joy,” Max Hightower, the transgender senior whose casting in a lead role triggered the ensuing events, said in a text message on Tuesday. He and other theater students were at a costume shop on Tuesday, a class trip that had been meant as a consolation after the disappointment of losing their production. Instead, it turned into a celebration. “I’m getting new Oklahoma costumes!!” he said.Before the school board vote Monday night, high schoolers and their parents had gathered at the district’s offices along with theater actors and transgender students from nearby Austin College. Local residents came to talk about decades of past productions at Sherman High School of “Oklahoma!,” which tells the story of an Oklahoma Territory farm girl and her courtship by two rival suitors. Many scoffed at the district’s objections to the musical, which school officials complained included “mature adult themes.”Sherman High made national headlines last week when it put a stop to a high school production of the musical “Oklahoma!” after a transgender student was cast in a lead role.Desiree Rios for The New York Times“‘Oklahoma!’ is generally regarded as one of the safest shows you could possibly pick to perform,” said Kirk Everist, a theater professor at Austin College who was among those who came to speak. “It’s almost a stereotype at this point.”Every seat in the room was filled, almost entirely with supporters of the production. Some lined the walls while others who were turned away waited outside. Of the 65 people who signed up to speak, only a handful voiced support for the district’s restrictions.The outpouring came as a shock, even to longtime Sherman residents.“What you’re seeing today is history,” said Valerie Fox, 41, a local L.G.B.T.Q. advocate and the parent of a queer high schooler. Ms. Fox said she was taken aback by the scene of dozens of transgender people and their supporters holding signs and flags outside the district offices. “This is one of the biggest things we’ve seen in Sherman.”The town, a short drive from Dallas, has been a place where many conservatives have gone to escape the city. Some were supportive of the superintendent’s initial decision to restrict the musical.“Adult content doesn’t belong in high school; they’re still kids,” Renée Snow, 62, said earlier on Monday as she sat with her friend on a bench outside the county courthouse. “It’s about education. It’s not about lifestyle.”Her friend, Lyn Williams, 69, agreed. “It doesn’t seem like anyone is willing to stand up for anything anymore,” she said.At a local shoe store, no one needed to be reminded of the details of the controversy. One shopper, shaking a pair of insoles, said that she believed that God made people either male or female, and that the issue was a simple as that.“I’m beyond excited and everyone cried tears of joy,” Max Hightower, the transgender senior at the high school whose casting in a lead role triggered the ensuing events, said in a text message on Tuesday. Desiree Rios for The New York TimesInside the courthouse, Bruce Dawsey, the top executive for Grayson County, described a rural community coming to terms with its evolution into a place where urban development is altering the landscape. Not far away, more than a half-dozen cranes could be seen towering over a new high-tech facility for Texas Instruments. The high school, with more than 2,200 students, opened on a sprawling new campus in 2021, its grass still uniform, its newly planted trees still struggling to provide shade. With all the growth, the school is already too small.“The majority is Republican, and it’s conservative Republican,” Mr. Dawsey said. “But not so ultraconservative that it’s not welcoming.”Still, some in and around Sherman have chafed at the changes. When Beto O’Rourke, a Democratic candidate for governor, campaigned through the county last year, he was met with aggressive protesters who confronted him over gun rights, some carrying assault-style rifles. A few wore T-shirts suggesting opposition to liberal urban governance: “Don’t Dallas My Grayson County.”But the controversy over “Oklahoma!” came as a surprise. The musical had been selected and approved last school year, casting was completed in August and more than 60 students in the cast and crew — as well as dozens of dancers — had been preparing for months. Performances were scheduled for early December.Max, 17, had been cast in a minor role. But then, in late October, one of the leads was cut from the production, and Max got the part, the biggest he had ever had. He was elated.Days later, his father, Phillip Hightower, got a call from the high school principal, who told him that Max could not have the part because, under a new policy, no students could play roles that differed from their sex at birth. “He was not rude or disrespectful, but he was very curt and to the point,” Mr. Hightower recalled.Phillip Hightower got a call from the high school principal who told him that Max could not have the part because, under a new policy, no students could play roles that differed from their sex at birth.Desiree Rios for The New York TimesThe district later denied having such a policy. But the principal also left messages for other parents whose children were losing their roles, one of which was shared with The New York Times.“This is Scott Johnston, principal at Sherman High School,” a man’s voice said on the recording. “Moving forward, the Sherman theater department will cast students born as females in female roles and students born as males in male roles.”The message diverged from the rules for high school theater competitions in Texas, which allow for students to be cast in roles regardless of gender.The district did not make Mr. Johnston or the superintendent, Mr. Bennett, available for an interview.In his previous role as an assistant superintendent, Mr. Bennett had objected to the content of a theater production by Sherman High School, according to the former choir director, Anna Clarkson. She recalled Mr. Bennett asking her to change a lesbian character into a straight character in the school’s production of “Legally Blonde” in 2015, and to cut a song entitled “Gay or European?”At the school board meeting on Monday, theater students from the high school described how things had become worse for gay and transgender students at school since the production was halted. Slurs. Taunts. Arguments in the halls.“People are following me around calling me girl-boy,” said Max.Kayla Brooks and her wife, Liz Banks, arrived at the meeting bracing for a tough night. Their daughter Ellis had lost a part playing a male character, and they had been actively working with other parents to oppose the changes.Max Hightower, 17, had originally been cast in a minor part in the musical, but was promoted in October to a leading role, the biggest he had ever had.Desiree Rios for The New York Times“We were both nervous, because we live in Sherman,” said Ms. Banks. Then they saw the large, supportive crowd outside. “We began weeping in the car,” Ms. Brooks said.The school board sat mostly stone-faced as dozens of people testified in support of the theater students, sharing personal histories. A transgender student at Austin College said he had not before come out publicly. Sherman residents lamented the way the school district’s position had made the town look.“I just want this town to be what it can be and not be a laughingstock for the entire nation,” one woman, Rebecca Gebhard, told the board.After nearly three hours, the board went behind closed doors. The crowds left. Few expected a significant decision was imminent.Then, after 10 p.m., the board took their seats again and introduced a motion for a vote: Since there was no official policy on gender for casting, the original version of the musical should be reinstated. All seven board members voted in favor, including one who had, months before, protested against a gay pride event.“We want to apologize to our students, parents, our community regarding the circumstances that they’ve had to go through,” the board president, Brad Morgan, said afterward.Sitting in their living room on Tuesday morning, Ms. Banks and Ms. Brooks recalled how their daughter delivered them the news. “She just said, ‘We won,’” Ms. Brooks said. “She was beaming, smiling ear to ear.” The musical would be performed in January.The couple decided, for the first time, to hang a pride flag in the window of their home. For now, they felt a little more confident in their neighbors than they had a day before.Alain Delaquérière More