Two armed robbers stormed into a pub in only to find it filled with police officers who thwarted their robbery in Baltimore, Maryland on Aug. 29, 2017. Above, a hooded and armed man can be seen with his hands raised in surrender. Getty Images

In an outlandish twist to an armed robbery, two masked men stormed into a pub in Baltimore, Maryland, on Tuesday, only to find it filled with police officers.

Joseph McInnis III, 21, and 22-year-old Tyree McCoy entered the take-out portion of Monaghan’s Pub in Woodlawn a little before 5:30 p.m, holding up an employee at gunpoint before running off with an undisclosed amount of cash, according to WBAL-TV.

However, what they did not know was a group of police officers was attending the retirement party of one of their colleagues in the same pub.

And it was not long before the off-duty officers ran out of the pub and apprehended the duo.

Baltimore County Police Officer Jennifer Peach said about the incident: "At that time, the person who had been behind the counter knew that there was a retirement party for a police officer happening, so they went into the other portion and alerted the officers to the fact that they had just been involved in an armed robbery."

He added: "I'm sure that they weren't planning on there being a large room filled with police officers,"

The owner of pub, Jack Milani, told Baltimore Sun that it was odd the robbers would chose to rob a place that was located right across a police station.

"It’s kind of odd you would even attempt it,” he said. “Officers are always in here. There was a decent amount of them.”

The crooks were charged with armed robbery and possession of a handgun and were being held without bail at the Baltimore County Detention Center, reported the New York Post.

However, this bizarre instance isn't the only time when a robbery attempt was made to rob a place filled with security personnel.

In France last year, armed robbers held up a McDonalds in Besancon, firing in the air with a shotgun, and threatening the staff to open the cash till. Unluckily for them, among the customers were 11 off-duty members of the French paramilitary special forces, Groupe d’Intervention de la Gendarmerie Nationale, who pounced on the robbers and stopped them from getting away.

In another such incident, surveillance video of a bar in Beloit, Wisconsin, caught an 18-year-old running into a bar filled with off-duty police officers, in an attempt to rob it. The officers from the city of Eau Claire managed to foil the robbery by taking him down.

Another video of a similar foiled robbery that occurred in Brazil in June showed a would-be robber entering a LiveLeak store with his gun drawn, only to find himself surrounded by four off-duty officers in plain clothes. The officers standing in line to check out acted immediately, drawing their guns and one of the officers shot at the would-be robber.