Comedian Gallagher collapsed on stage during a performance in Minnesota Thursday night ... and the scary moment was all captured on video.
The footage -- shot in Rochester, Minnesota at Whiskey Bones Road House -- shows Gallagher slam something with his sledgehammer ... then hunch over and fall backwards onto the stage.
Moments after Gallagher hits the ground, people from the audience ran on stage to help. He was transported to Saint Mary's Hospital shortly after the incident.
A rep for Gallagher tells TMZ he is awake this morning, feeling weak, but his spirits are good. Doctors have not yet determined what happened.
UPDATE: Gallagher's manager tells TMZ he will cancel his next few shows, scheduled for tonight and tomorrow, and the rest of his upcoming schedule is up in the air ... depending on how he checks out. There is no timetable for his release.
We're also told Gallagher is awake, making jokes, laughing and his spirits are really high.