Thank goodness there actually was a doctor in the house.

Dr. Andrew Wollowitz, 54, was sitting in the audience of a dance performance at Baryshnikov Art Center in New York City when a 22-year-old male dancer collapsed onstage, according to the New York Daily News.

As a director of emergency medicine at Montefiore Medical Center, Wollowitz knew something was wrong and rushed to the stage from the fifth row.  When he found the dancer had no pulse, he immediately start CPR .

“He wasn’t alive, so I started compressions – 80 to 100 a minute,” Wollowitz told the New York Daily News.

The dancer was able to take a few breaths on his own, but then faded again.  Wollowitz continued to perform CPR for five minutes until firefighters arrived, who were then able to resuscitate the dancer with a defibrillator.

Paramedics then took the dancer – who asked the Daily News to withhold his name – to the hospital where he spent five nights. His doctors believe he suffered a rare arrhythmia, a condition they said is more prevalent in young athletes than previously thought.

According to Wollowitz, if the dancer had gone a minute or two more with reduced oxygen levels, he may have suffered from severe brain damage.

Click here to read more from the New York Daily News.