School officials in suburban Maryland on Wednesday backed off a decision to cancel a school musical that they had deemed inappropriate for middle school, saying performances could go on with a warning to audiences about mature content.

The reversal came a day after a tense meeting where school officials faced questions about whether gay characters in a student production of “The 25th Annual Putnam County Spelling Bee” at Hyattsville Middle School led to the abrupt decision to abandon the show.

They had given little explanation for the mid-April decision, just before schools closed for spring break. As word of the cancellation had spread, parents grew concerned about the reason for the move, with discussions on social media and among students focusing on the presence of gay characters.

“This is Hyattsville, Maryland, in 2019, and I can’t believe that is a reason,” said Elizabeth Tornquist, whose daughter was rehearsing for the show in the Prince George’s County school.

In a letter home to families Wednesday, school officials repeated their contention that their halting of the show had nothing to do with a same-sex couple that is part of the musical.

“Any commentary that suggests the play was postponed due to the inclusion of gay characters is inaccurate and does not reflect the views of Hyattsville Middle School or Prince George’s County Public Schools,” Principal Thornton Boone wrote.

Boone said there are no plans to remove gay characters or references from the production and credited those at the Tuesday meeting for a “thoughtful dialogue” that led to a compromise keeping the focus on “young performers and families who invested considerable time, enthusiasm and expense in this production.”

The unanswered question surrounding the show had in recent days led to an online petition and support for the musical from actors including Jesse Tyler Ferguson, a star in the sitcom “Modern Family” and a cast member in the Broadway production of “Spelling Bee.”

“As one of the original ‘Gay Dads’ in Spelling Bee & a hopeful future Gay Dad I am so annoyed by this,” he tweeted. “Pull it together Maryland Middle School. I’m sure there are gay students in your school. Think about how this is impacting them. What a disappointment.”

Students had practiced for their spring musical for months — reciting lines, learning songs and imagining the world of the spelling bee contestants who were at the heart of their show. Just weeks before curtains were expected to rise, the show was called off.

Boone’s letter said the show would be rescheduled to mid-May to allow students to make up for lost rehearsal time. Other changes in the works include requiring signed permission forms for crew and cast members, and a “PG-13” label on promotional materials.

On Tuesday, parents had demanded answers for the abrupt cancellation. A small group protested before the meeting, bearing signs with messages that included “The Show Must Go On!” and “Three Months of Work For Nothing?”

Robert Kapler, whose 13-year-old daughter was among 28 students involved in the musical, said Tuesday that he was dismayed to hear of the show being halted so close to curtain time.

“She would wake up and practice,” he said. “She practiced after school, and she practiced at night. She practiced her singing. She practiced her dancing. She practiced her lines. My main concern is that they’re shutting down something that should have been allowed to go forward because they put so much work into it.”

Jamie McGonnigal, a gay parent and LGBTQ advocate in Hyattsville with a background in Broadway theater, joined the protest and started the petition calling for the show to be reinstated. More than 1,000 names were added in the first day.

McGonnigal took issue with the school system’s explanation for dropping the show, which he called “all over the place,” and said his conversations with students and others pointed to a concern about the gay characters.

“They have already sent a pretty clear message to the LGBTQ community at the school that being gay is something you should be ashamed of — and that has already caused harm,” he said.

The issue hit a nerve in Hyattsville, a community that many say prides itself on being diverse, welcoming and LGBTQ-friendly.

School officials acknowledged Tuesday that concern over the musical had begun with an unspecified parent’s complaint, which had led to a close review of the script — which led to the cancellation.

Justine Christianson, president of the school’s PTSO, said she had received an email Tuesday morning from Monica Goldson, interim chief executive of the school system, saying the cancellation came after teacher concerns about the musical’s “extended use of profanity.” The email said the play’s content had been reviewed by school officials who decided to cancel the play because copyright laws did not permit a change in language.

“It was then deemed more appropriate for high school and not middle school,” the email from Goldson said. A process would be created to approve plays before students begin practicing “to ensure this does not happen again,” the email said.

At the parent meeting, school officials did not describe the material they found objectionable in detail but said it included racial humor, sexual innuendo and profanity.

Parents pressed to know more about when and how concerns had arisen — and where the process had gone wrong. “This play is two weeks out. . . . I find it completely unacceptable,” one mother said.

It was a student at the gathering who proposed what became the resolution: letting people know the musical had more mature content. Her proposal drew support from a school board member, Pamela Boozer-Strother,­ who represents the area.

Other school officials — who had at first defended the decision to cancel the show — agreed to take another look.

They said they would review the student’s proposal for a disclaimer and ask the licensing agent again about language modifications. They did not detail which words they wanted to change.

A schools spokeswoman said Wednesday that parents would be invited to review the script and suggest changes, which school officials would then take to the licensing company. If the changes are not accepted, the show would still go on, said spokeswoman Raven Hill.

Karl Kippola, a professor and director of the theater and musical theater program at American University, directed a campus production of the musical. He called it a “lovely” show — lighthearted and irreverent but also moving as it depicts the struggles of young spelling bee contestants.

He said one contestant’s gay parents appear briefly, and there are a couple of instances of mild profanity “but not anything that people have not heard in school before.”

Jesus is invoked in an exclamation, he said — which leads to the appearance of an actor dressed as Jesus, who gives the speller advice.

“The idea that people would be offended by it, that seems to be a little bit of a stretch,” he said.

He said he could not call it a safe, traditional pick for a middle school but could see how students would find it fun to work on.

“It would be something they could relate to much more personally and directly,” he said. “Above all, the musical is funny and it makes the problems accessible but not overwhelming.”

He added: “People who are looking to be offended can find something offensive in it, but I think you can do that with most musicals.”