Photo: Michael Short, Special To The Chronicle

Confusion over a woman suffering from a medical emergency in the crowd of a “Hamilton” musical performance at the SHN Orpheum Theatre in San Francisco prompted a brief panic in the audience on Friday night, sending many fleeing outside and causing several injuries, including a broken leg.

Several crowd members detailed the confusion on social media, stating some theatergoers misunderstood what was going on as the woman was being tended to near the end of the show. Some posted that they’d heard the word “gun” uttered, scaring people and causing them to flee. The frightened patrons were all calmed down when emergency officials arrived.

Much of the audience evacuated the theater, and at least three people received non-life-threatening injuries in the rush — one suffering a broken leg — fire and police officials said. After the panic was over the crowd went back inside for the end of the show.

San Francisco Fire officials confirmed that a woman with a “medical emergency” was transported from the Orpheum to San Francisco General Hospital, and was in critical condition Friday night.

San Francisco Police spokesman Officer Joseph Tomlinson said the confusion appeared to have been caused just before 10 p.m. by people misinterpreting a quick pair of events. At the same time the woman in the theater suffered her medical problem, a fake gun went off onstage as part of the show. Some in the crowd assumed from the noise and the woman’s condition that she had been injured by actual gunfire — which, of course was not the case.

Lauren Hernandez is a San Francisco Chronicle staff writer. Email: lauren.hernandez@sfchronicle.com Twitter: @LaurenPorFavor