A performance of the Broadway musical Hamilton went awry at a San Francisco theater after several attendees mistook a staged shooting of the main character for a real shooting, CNN is reporting. The panicked audience members fled the theater in terror, causing injuries in the process.

At a sold-out performance of the hit musical at the city’s Orpheum Theater Friday night, a handful of audience members were apparently unprepared for the scene in which Hamilton is shot by his rival Aaron Burr, and thought the staged gunfire was a real shooting.

Hours earlier, a mass shooting in Illinois had claimed six lives, including that of the gunman.

San Francisco police say via KPIX-TV (San Francisco) that a woman in the audience was so shocked that she was having symptoms of a heart attack, causing patrons near her to believe that she had been shot. Allegedly another patron yelled “Gun!”, and mass panic ensued.

Things only got worse when a patron grabbed a nearby Automated External Defibrilator (AED) machine to treat the woman’s cardiac symptoms. The machine’s alarms confused some patrons, apparently thinking it was the fire alarm. This caused some panicked attendees to flee for the exits, said San Francisco police in a statement.

“An adult had a medical emergency at the Orpheum Theater An AED was pulled which also triggered an alarm during the Hamilton Play. This resulted in confusion, and an un-organized rapid exit of the theater.”

There was mass chaos in the audience at the Friday night performance of Hamilton at the Orpheum Theatre in San Francisco. https://t.co/HwFbtWEsoK

CNN reporter Shirin Rajaee happened to be there, as an audience member.

“It was pretty terrified to witness. People were actively exiting the theater, jumping into police cars thinking there was an active shooter.”

Similarly, patron Laura Lasnier described the scene as “mass chaos,” and says that theater officials did nothing to help the situation, neither by making any public announcements nor by assisting with the evacuation.

When the dust had settled, three people were injured, one with a broken leg. The woman whose symptoms started the panic was also taken to a hospital, where she remains in critical condition.

Eventually, the entire theater was evacuated, including cast and crew. A cast member posted the following video on Instagram of the aftermath of the event.

“it was chaos! A lady was almost trampled right in front of me and I was screaming at people to calm down and let her up.”

The performance was canceled, and it remains unclear, as of this writing, whether the patrons will be given refunds or rain checks for a future performance. Tickets to Hamilton can cost hundreds of dollars at face value, and can cost thousands in the resale market.