The lead character has just successfully carried out their tricky infiltration of some high-security facility and copied the information/stolen the technology/rescued the prisoner/what-have-you. Just as they're done, in wanders some random security guard, who sounds the alarm. Cue the action sequence.
Basically it's a way for a Spy Drama
to have its cake and eat it too. You want to see a perfectly-executed piece of espionage, but you also want to see the lead kicking and shooting and fleeing? Throw in some nicely-timed security personnel and you can have it both ways. Although sometimes you have to wonder, did the question "What do we do about the security patrol?" never even come up during planning? In Spy Fiction, the fact that the enemy would quickly realise that their secret files had been stolen also rarely seems to come up.
Otherwise, this trope is something of an example of Truth in Television
. It is surprising how many crimes are stopped because police or security forces happened to show up at just the wrong time for the criminals, or someone saw something and called the police.
Related to Contrived Coincidence
and possible Diabolus ex Machina
Anime and Manga
- Mai-HiME, although it's subverted in two ways: first, Mikoto triggers the alarm before Mai and Natsuki even manage to get into the (abandoned) facility, and second, when the guards arrive just as the girls are leaving, Mai persuades the other two to surrender despite their readiness to fight. They later escape anyway, with the help of a conveniently-timed ambush.
- Masses To Masses: Just as Ian finishes the infiltration to seize illegal organs, one random guard manages to sneak up on him and is about to get help. Instead, gets a punch to the face.
- Escape from Sobibor: One of the guards goes into a senior officers office and discovers him by spotting blood and following its trail, marking the turning point of the escape when they had previously gotten along without widespread discovery
- This trope is particularly favoured by Alias, which does it almost Once an Episode.
- Happens on occasion in Burn Notice, usually to the delight of the 'narrator' who always has good ideas on how to effectively deal with such a predicament.
- Shadowmaster Chronicles parodies and subverts it.
Hay Lin: "Why not just take out a guard and blend in?"
Dakota: "Because that's stupid. The point of espionage is to NOT BE NOTICED BY ANYONE. What if that guard had buddies? Or was invited to play poker or something?"
- Red vs. Blue In the second episode of Season 9, when the guard catches South stealing data from the terminal.