Police arrested two men after an hours-long standoff trapped nearly 50 patrons at an Airdrie, Alta. pub Saturday evening.

The incident began within Calgary's city limits just before 9 a.m., when officers tried to stop a truck carrying two suspects wanted in connection with a string of robberies, Duty Insp. Patty McCallum said.

The suspects took off in the truck, but officers chased the vehicle through the city’s streets with the help of a police helicopter.

In his attempt to lose police, the driver of the truck was involved in at least one hit-and-run collision.

The chase ended north of the city near the Toad ‘n’ Turtle Pubhouse & Grill in Airdrie, when the truck collided with a “fixed object,” McCallum said.

The two men then fled toward the pub and climbed the back staircase to the glassed-in rooftop patio, where they remained as police attempted to arrest them.

The pub’s chef told CTV Calgary that the suspects were planning to hide from police in a small hatch in the roof.

“They just thought they would hide until police left,” Dave McHugh said.

As the standoff dragged on, a police sniper was positioned on a nearby rooftop and a police helicopter circled over the location.

The pub’s patrons were told they could not leave during the ordeal.

“They said that there were some suspects on our rooftop patio area and they just needed to secure the area and find the people,” one pub employee said.

Police arrested the two men without incident at 5:30 p.m. local time, several hours after the ordeal began.

Airdrie Mayor Peter Brown, who arrived on the scene, praised RCMP officers for their handling of the situation.

“The RCMP have been fantastic,” Brown said.

With files from CTV Calgary