Among the 40 diners at the burger joint that was being raided, 11 turned out to be members of elite military force. (Photo: Pixabay)

Besancon, France: When two men decided to rob a McDonald's in eastern France they hadn't expected to come face to face with a table of hungry soldiers from an elite military force.

The armed men burst into the fast food outlet in the commune of Ecole-Valentin late Sunday, with one firing a warning shot while the other raided the till for cash.

But amongst the around 40 diners in the burger joint were 11 members of an elite branch of the French Armed Forces -- particularly hardened soldiers who specialise in hostage situations.

The off-duty soldiers waited for the end of the heist to intervene so as not to put other patrons in danger, Besancon public prosecutor Edwige Roux-Morizot said Monday.

The first man, who was carrying around 2,000 euros ($2,270) cash, stumbled as he attempted to flee and was captured, while the other was shot in the abdomen by one of the elite forces and arrested.

The two men are currently in hospital and will appear before a judge on charges of armed robbery and violence, Roux-Morizot said.