The wildly popular musical "Hamilton" ended in chaos Friday night in San Francisco's Orpheum Theater after several attendees required medical attention during the performance.

What audience members thought was an active shooter ended up being a medical emergency, officials said.

The audience reportedly heard someone was carrying a gun inside the theater and started screaming, leading others into a panic, running out of the theater and sending the "Hamilton" cast backstage.

"There was no one with a gun, there were no shots fired, at the end it was a medical emergency," said San Francisco Police Captain Renee Pagano.

A boy reportedly had a seizure at the same time there was a gunshot sound coming from the play, confusing the crowd.



In a separate incident, someone else in the crowd had a heart attack and emergency personnel had to use an automated external defibrillator, triggering an alarm and resulting in confusion and the rapid exit of people from the theater, according to the San Francisco Fire Department.

NBC Bay Area reporter Marianne Favro, who was attending the play Friday night, tweeted that audience members were hiding behind seats until police gave the all clear.

The woman who had a heart attack was revived and remained hospitalized Saturday in critical condition, city fire department spokesman Jonathan Baxter said.

Two others had to be transported to the hospital with injuries to the head and leg but are expected to be okay.

The performance did not continue but people were allowed back into the theater to grab their belongings.

The owner of the Orpheum said audience members were invited to see another performance of the popular Tony Award-winning show.

The Associated Press contributed to this report.