A suspected armed robber who had just swiped an undisclosed amount of money from a Maine bank didn’t get very far after he slipped on ice outside – and in front of a cop.

Waterville Police said the suspect – later identified as 38-year-old Jason Mackenrodt -- had just held up a Bangor Savings Bank and was trying to flee the scene.

Unfortunately for him, the parking lot across the street was a little icy and Mackenrodt slipped and fell, spilling the cash and run from his jacket pocket on to the pavement, in front of a Maine State Police agent who was sitting in his car, officials said.

EX-BOYFRIEND ADMITS TO STUFFING VALERIE REYES IN SUITCASE, CLAIMS SHE HIT HER HEAD AFTER SEX, FEDS SAY

Police said Special Agent Glen Lang saw the gun and money and quickly realized Mackenrodt had just robbed the bank.

Mackenrodt attempted to flee but was reportedly tackled by Lang before he got too far.

"The special agent from the State Police -- he was in the right place at the right time. Very competent officer with a lot of years of experience,” Waterville Deputy Police Chief William Bonney told WABI. “He did a great job in apprehending this guy without any injury, keeping the community safe, keeping the suspect safe, and keeping himself safe.”

According to WABI, Mackenrodt used a BB gun to rob the bank. The cash that spilled from his jacket was swept up by the wind and members of the public dashed to scoop it up, police said.

CLICK HERE TO GET THE FOX NEWS APP

Mackenrodt was arrested and charged with robbery and terrorizing. He is being held on $25,000 bail.