Updated

It's rare for police officers to arrive on the scene even before a crime occurs.

But officials said that was the case Tuesday, as two armed robbers targeted a Maryland bar -- that was hosting a police retirement party.

The masked men entered Monaghan’s Pub in Baltimore -- which is across the street from a police station -- around 5:30 p.m., pointed a gun at the cashier and demanded money from the register, FOX29 reported.

WATCH 'WORST' BURGLAR COMPLETELY BOTCH BAR ROBBERY

But the robbers didn’t know just one room over, a group of officers from the Baltimore County Police Department were celebrating a sergeant's retirement.

Shortly after the robbery occurred, an employee alerted the cops -- who arrested the suspects after a short foot pursuit.

Police charged Joseph McInnis III, 21, and Tyree McCoy, 22, with armed robbery and theft, among other offenses.