Police arrested a masked man Tuesday night after he attempted to rob security guards.

The incident took place around 10:25 p.m. at an ATM on Beaubien St. near 27th Ave. in Montreal.

A pair of armoured car security guards had walked into the front door of the bank when they encountered a man holding what appeared to be a firearm.

The guards immediately ran outside and called 9-1-1, then waited for police to show up.

When police officers arrived they arrested the man who had been lying in wait.

That man, 55-years-old, was detained overnight and was questioned Wednesday morning.

Police are also conducting an analysis of his weapon, which appeared to be a paintball gun, and to determine how much damage it could do.