A robber pointing a gun at a gas station store clerk was stopped by a fast-thinking customer — and the entire dramatic incident was captured on surveillance video.

Police said Michael Corbin, 50, walked into an AM/PM store in Richmond, Calif., about an hour north of San Jose, armed with a revolver around 1:30 a.m. Wednesday, the San Jose Mercury News reported.

Image source: Surveillance video via San Jose Mercury News

Image source: Surveillance video via San Jose Mercury News

Corbin pointed the gun at the clerk, who then grabbed Corbin’s hand and tried to wrestle the revolver from his grasp, Sgt. Nicole Abetkov said.

Image source: Surveillance video via San Jose Mercury News

Image source: Surveillance video via San Jose Mercury News

Another man inside the store heard the commotion and ran to the counter, Abetkov said, body-slamming Corbin, knocking the gun from his hand, and holding him down until police arrived.

Image source: Surveillance video via San Jose Mercury News

Image source: Surveillance video via San Jose Mercury News

Image source: Surveillance video via San Jose Mercury News

Image source: Surveillance video via San Jose Mercury News

Interestingly surveillance video shows a customer standing shoulder to shoulder with Corbin as he pointed the gun at the clerk. When the two wrestled for control of the weapon, this customer ran from the altercation, crossing paths with the man who came to assist.

Image source: Surveillance video via San Jose Mercury News

Image source: Surveillance video via San Jose Mercury News

Abetkov said Corbin has a criminal record but similar robberies aren’t part of it.

Corbin is charged with possession of a firearm and robbery and being held in jail on $100,000 bail.