Eleven armed members of an elite paramilitary force happened to be eating inside.
The pair allegedly burst into the Ecole-Valentin branch of the fast-food restaurant in the eastern French city of Besancon on Sunday. They fired a shotgun at the ceiling, yelling at the customers inside to get on the floor, the city's prosecutor Edwige Roux-Morizot told CNN.
One of the robbers then stole about 2000 euros ($2,269) from the registers before the men ran away, she said.
Unfortunately for them, among the 40-odd customers grabbing burgers at the time were 11 members of the GIGN (National Gendarmerie Intervention Group), an elite special operations unit of the national gendarme which specializes in counter-terror and hostage situations.
Nine of them, who were wearing plain clothes but carrying weapons, chased the robbers, said Roux-Morizot.
They caught one when he stumbled on stairs.
But the other robber, armed with the shotgun, kept running. At one point he took aim at the crack special forces officers, said the prosecutor.
The GIGN officers yelled at him to stop and fired warning shots to deter him, she said. But when he took aim again, they responded with a "neutralization shot" to his abdomen.
The suspects -- both of whom were born in 1991 and were known to police -- were then taken to hospital and charged with armed robbery, Roux-Morizot said.
She said the officers had delayed intervening earlier in the robbery because of the threat posed to the customers. None of the staff or customers were injured in the robbery.
No doubt the robbers are ruing their trip to the Golden Arches that day. But, as they say, we're lovin' it.