Just in Time

""Simmons, you get an F in efficiency, but I have to give you an A+ in dramatic timing!""

- Sarge, Red vs. Blue

They're in deep trouble. The Dragon or perhaps the Big Bad himself have them cornered, their heaviest hitters worn out. Their enemy is just about to unleash an attack that will no doubt kill them.

Cue The Hero, standing all cool-like, deflecting the Finishing Move and saying "Sorry I'm late" for effect.

Alternately, the hero is in dire straits until The Cavalry, his ragtag band of acquired friends, arrives to save the day.

A Sister Trope to Big Damn Heroes.

Contrast You Are Too Late, Remembered Too Late.

No relation to the eponymous time-traveller, Just in Time (which is just a pun on the term).

Some varieties:

Anime & Manga
"Ed: Stop waiting so you can make a grand entrance, Colonel!"
 * In one of the Appleseed movies, Deunan gets to the console that can shut down the rampaging mechas with more than a minute of time to spare before they are in position to fire their main guns. But this doesn't do her any good when
 * This is common in Bleach. One notable case is when Grimmjow's rampage gets interrupted twice in the same episode. Ichigo turns up at Rukia's execution to stop the supposedly unstoppable...giant magical bird that would destroy even her soul. As soon as it's mentioned Ichigo can't possibly block it twice, Ukitake and Kyoraku blow the thing up, with the former apologising for being late.
 * The fight in Naruto against Kimimaro, which has three. To summarize: Naruto is fighting Kimimaro, and Kimimaro is about to kill him. At the last possible second, someone shows up and saves Naruto, though you at least saw him coming there. He ends up not doing so well, and Kimimaro is about to kill him, but then at the last possible second someone else shows up out of absolutely nowhere and saves him. That person manages to seemingly defeat Kimimaro, but Kimimaro survives and starts off one last attack to kill them, and then at the last possible second he dies from his illness.
 * It also included Kimimaro about to kill one of the persons mentioned, only to be interrupted because it was time for that person to take medicine. Wow!
 * Kakashi's fight with Kakuzu. First he got saved by Shikamaru, then Naruto and Yamato.
 * There was also the time in the Land of Waves when Naruto showed up just in time to save the kid from the bandits, and he even lampshaded it by saying something along the lines of "A real hero always arrives right before it's too late!" He (probably) went on to say "BELIEVE IT!" several times.
 * Again in the Sasuke Retrieval arc, when Shikamaru is saved in his fight with Tayuya by Temari, and Kiba and Akamaru are saved in their fight with Sakon and Ukon by Kankuro.
 * There were plenty of those moments in the Sakura and Chiyo versus Sasori battle.
 * There was one involving Kakashi's first successful use of his Kamui, wherein he successfully saved Gai's team and his own team from Deidara's massive bomb at the last moment.
 * This is Lampshaded in the Black Cat manga, where Sven initially compliments Train for arriving at the perfect time to rescue Tearju, only to be told by a happy Train that he had actually arrived much earlier, but had waited until the critical moment to save her because it would be "cooler". Sven punches him.
 * Son Goku manages this a few times in Dragonball Z. Most notably in the Namek arc when he is Just In Time to save Gohan, Krillin and Vegeta from the Ginyu Special Taskforce. Also in the Saiyan arc when he saves Gohan and Krillin from Nappa, although in that case He Was Too Late to save his other comrades.
 * How Roy, Hawkeye et al execute their Big Damn Heroes to save Ed from Scar in chapter 6 of Fullmetal Alchemist. Also in chapter 93, where Ed lampshades it:


 * In Macross Frontier, Mikhail has a habit of doing this for Alto with a dramatically timed snipe, saving Alto from vaporization just in time in episode 2 and 13..
 * Done in episode 13 of Yu-Gi-Oh! GX: Judai duels a monkey named SAL to save one of Asuka's friends, and tells the scientist to promise that he'll set SAL free when he's done. In the end, Judai wins, but the scientist refuses to let SAL go. Just when all hope is lost, Daitokuji-sensei sics Pharaoh on the scientist's men and gives all of them a warning.

Comics

 * Subverted in Watchmen:
 * Spoofed in the "His Code Name Was The Fox" series of strips in FoxTrot: Roger's Marty Stu self-insert has less than a fraction of a second left to disarm a bomb, yet still correctly decides which of the 186 wires to cut.

Films

 * Little Shop of Horrors: Audrey II eats Mr. Mushnik as he's about to kill Seymour.
 * In the original Miracle on 34th Street, Kris Kringle's lawyer, Fred Gailey, interrupts the judge just as he is about to sign the commitment order for Kris. However, Fred immediately points out that even if he had been too late to stop the judge, he could have simply filed a habeus corpus motion and challenged the commitment anyway, meaning the nick of time entrance just meant that Mr. Gailey was spared some extra work for his client.
 * It's pointed out in the movie Galaxy Quest: the main characters star in a Star Trek-like show that makes frequent use of this trope, and the aliens that catch the signal and then base their entire society on the show don't realize it's fake. So they design their bombs to stop at exactly 1 second to go, since they always do so on the show.
 * Star Wars
 * Attack of the Clones. Having subdued Anakin (via force lightning) and Obi-Wan (via asskickery), Count Dooku is just about to deliver the fatal blow to Obi-Wan when... Anakin makes a miracle recovery and blocks Dooku's lightsaber just in time. Or look earlier in the film, when Yoda arrives on Geonosis with the clone army. Or when Anakin and Obi-Wan save Padmé from the poison millipede... things.
 * A New Hope. Vader is just beginning to fire his lasers at Luke when Han Solo comes back at the nick of time and blasts one of Vader's wingmen, causing a much needed distraction. And the Death Star was destroyed right as it was about to fire at Yavin IV (exact same thing appear to have also happened in Episode VI - there was a green flash right before the Death Star II exploded over Endor)
 * In Saw VI, William reaches the end of his tests just as the timer is at 1.
 * Unique subversion in Saw IV. Rigg reaches Detective Matthews right when the timer is at 1,
 * In Jurassic Park, the Tyrannosaurs Rex appears and kills the velicoraptors before they can kill the humans.
 * In Pokémon Arceus and The Jewel of Life, Arceus uses Flamethrower at Ash and the gang and their new friends but Giratina appears and takes the flames for them. Good thing it's not very effective.

Literature

 * In the Discworld novel Moving Pictures, Victor ponders the idea that since the Theory of Narrative Causality would ensure he arrives in the Nick of Time, he could stop to catch his breath but decides against it, because that would break the rules: he'll inevitably arrive in the nick of time, so long as he dramatically gives his all to get there.
 * Subverted in the beginning of Going Postal: Moist Von Lipwig (under an assumed name) is about to be hanged in the morning when a courier from Lord Vetinari arrives. Lipwig's relief vanishes when the message is delivered: "Get on with it, it's long past dawn!"
 * Around the World in Eighty Days ends the third to last chapter with Fogg concluding he has arrived too late and lost his bet, leaving him ruined. However, the penultimate chapter has him suddenly arriving just in time to win after all. As the surprised reader wonders how he pulled that off, the narrator explains that Fogg forgot to account for gaining a day after crossing the International Date Line, meaning he arrived early without knowing it and would never have realized his mistake in time if his love, Aouda, hadn't set off a chain of events that alerted Fogg he still had time to win the bet.
 * Considered an actual duty by the Roving Reptilian Rescuers in Walter Moers' The Thirteen and A Half Lives of Captain Bluebear. Unless it's absolutely vital, they refuse to show up at any point before the last moment. One of them is actually named Deus X. "Mac" Machina.
 * Doubling as a Big Damn Heroes moment, in the Darkest Powers series, Derek tracks down Chloe in just enough time to.
 * Matthew Reilly uses this often, but one that just begs to be mentioned comes from Scarecrow: a nuclear missile is prevented from being launched with less than a second left. And a different nuclear missile is shut down in mid-flight.
 * In Robert E. Howard's "The Slithering Shadow", Conan the Barbarian, running away from a Zerg Rush, gets dropped through a Trap Door to where Natala has been abducted, just in time to save her from the Living Shadow.

Live Action TV
"The Doctor: Thank you, Brigadier. But do you think for once in your life you could manage to arrive before the nick of time?"
 * Walker, Texas Ranger: Regularly used, to varyingly degrees. A frequent use will be a split second before the villain is about to leave town, kill someone or carry out a particularly evil act (e.g., committ a huge bank robbery and kill hundreds of people inside), only for Walker and Trivette to arrive at the last second – with an army of police officers – and, after interrupting the vile act, beat up the bad guys.
 * The Twilight Zone: In the 1980s revival premiere, "A Little Peace and Quiet," a woman who finds an amulet that can stop time uses her gift selfishly; unable to control her chaotic household/bratty children/henpecking husband/rude neighbors, she stops time to regain her senses. The backstory – rapidly deteriorating tensions between the Untied States and the Soviet Union – marches to the forefront at the end of the story, when the USSR unleashes a large-scale nuclear attack on the United States. Just a split second before her neighborhood is swallowed up in a nuclear blast, the woman manages to freeze time (with the words, "Shut up!"). This leaves the woman forever in a state of frozen time, living alone in what is thought to represent the last instant before the explosion and resulting blast envelopes her hometown. (Indeed, in the distance, a large fireball – presumably growing – is seen; that explosion could be heard in the final second before the woman manages to freeze time.)
 * Lampshaded in Doctor Who with the following quote:


 * Subverted in an episode of My Parents Are Aliens: a countdown clock reaches zero—and goes on down into the negative numbers. "On our home planet, countdowns go to minus 10!"
 * Subverted in Monty Python's Flying Circus: In one scene, a Russian rifle squad is about to execute a "spy" when a messenger runs in at the last second and stops them. The message? "Carry on with the execution."
 * This is used countless times in Stargate SG-1. In one case several SG teams come to rescue SG-1 from Hathor minutes before they were to be executed. Most cases of this trope, however, are when someone or something is "beamed" away with transporter technology at just the right moment. In most cases the heroes are beamed away to safety, but in some cases an enemy or weapon is beamed away just as it is about to kill someone. There are a few cases in which the trope is inverted, such as when someone (usually Jack or Daniel) is whisked away just as they are about to say something important. These "Just in Time" moments are Lampshaded almost every time, especially in the 200th-episode special when the team is reading a script for a sci-fi movie based on their experiences and the movie's heroes are beamed away right before the base collapses on them. They comment that this is "too convenient", and the movie's producer replies that they can simply "hang a lantern on it" (Lampshade) and move on.
 * The main difference between the standard use of this trope and this use of it is that the heroes are typically the ones being rescued just in time, rather than the ones performing the just-in-time rescue. That's not to say that this is always the case, though—but when they do rescue someone just in time, it is usually one of their teammate heroes.
 * On Top Gear, Jeremy Clarkson once faced the challenge of running a Jaguar S-Type diesel around the Nürburgring in under ten minutes—for testing purposes, the clock was set as a countdown timer. On his final run, he made it with one second to spare.
 * Dexter has the random workmen who show up at exactly the right moment to prevent Dexter from dropping the season's Big Bad off a building.
 * In the second episode of Blackadder Goes Forth, Blackadder is cheerily quipping on his way to be Shot At Dawn, because he expects George's uncle to let him off. When they get as far as "Ready, aim..." he starts to get nervous, and then a message arrives. Blackadder comments "I think that's what they call the nick of time", but it's a card reading "Here's looking at you, from all the boys in the firing squad". They get as far as "Fi.." before the real message arrives.
 * Always happens in Criminal Minds. Always. Because the unsubs are usually serial killers, they'll still have targets after the team has identified them, and sure enough, as the team visits the unsub's house, they discover that he's moved on to his next kill, and they catch up to him when he's seconds away from finishing his next murder. Always.
 * In Sherlock, John Watson shows up Just in Time to.
 * Tragically averted in an episode of Deep Space 9. While the crew of the Defiant looks like they'll be able to  it turns out they were too late. Worse, they were   because they had actually been.

Professional Wrestling

 * The "just in time" trope is a very common staple in professional wrestling. Several ways this can be carried out:
 * A face wrestler who is on the verge of defeat will either 1. Kick out (sometimes, rather emphatically) out of a sure pinfall at the last possible instant before the referee completes the three count – almost always, after the heel wrestler performs a powerful finishing move on the face; 2. appear to pass out from a very powerful submission hold, only to rally by either powering himself out of the hold or reaching the ring ropes, which, under the rules, almost always requires the aggressive wrestler to break the hold.
 * A "weaker" wrestler – a jobber or one of the mid- to upper-card faces – will suffer a severe beatdown by one or more heels (often including a monster heel). Just as the face/jobber is about to be finished off for good, the head babyface will run out to the ring and run the bad guys off.
 * Often reversed, usually by the face about to complete giving a heel wrestler his comeuppance, only for the heel's associates or a monster heel (under which he might be serving) to run out and begin a beatdown just before the three count is completed.

Tabletop Games

 * In Nobilis, players can take the Perfect Timing gift. In its lesser form, it ensures they arrive just in time whenever it's physically possible to do so. Its greater form does the same without any of that pesky causality getting in your way, so feel free to take a week to prepare for the evil cult's sacrifice tomorrow evening.
 * In 3e, this is one of the basic powers of an Aspect 3 Miracle—it ensures that whenever you use it to take some physical action, you complete it either 'instantly', 'at just the right time', or (in an absolute worst case) 'just in time.' Unless opposed by another Miracle, you are always guaranteed to be at least just in time when using Aspect 3.

Video Games

 * Due to the way that actions are triggered in videogames, players cannot help but arrive in the nick of time. This can result in the appearance of a world which is so dangerous that it begs the question of how anyone survives long enough for the hero to arrive on scene. The answer in System Shock games is...they don't survive. The player is always too late, up to the nick of time, and can only witness the remains and read the Apocalyptic Log.
 * Several cases in the Phoenix Wright: Ace Attorney series have everything seem lost, only for a casebreaking piece of evidence to appear at just the last moment. A particularly extreme example occurs in the first game.
 * Taken Serial Escalation in the final case of Investigations, where this happens four times in succession whenever the Big Bad tries to make his escape. To be fair, the last two were already there.
 * A chilling subversion comes in Rainbow Six: Vegas 2. Your squad of highly trained covert anti-terror badasses arrive in a Rec Center where hostages are being held... just in time for the terrorists to fill the area with poison gas, killing the civilians.
 * At the end of Super Smash Bros. Brawl's Subspace Emissary story, all the heroes are gathered before, who prepares to simply blow them all away with another helping of his One-Hit Kill Off Waves... only for to zoom in out of nowhere, smash the  giving said attack power, and join in for the final battle. It just goes to show; "Heroes always arrive late."
 * Sabin in Final Fantasy VI. Turns into a Duel Boss battle.
 * In Metroid Prime 3: Corruption, Samus learns that her ship is under attack while it's parked. As she returns to her ship, the damage gets progressively worse, before arriving to the scene of the crime, finding that is pounding at its hull.  looks at Samus to say "just in time!" before attacking her.

Web Comics

 * Impure Blood Roan has to escape by sunrise. Naturally it's dawn by the time they get him to the gates

Western Animation

 * W-a-a-a-y overused in the first season of Code Lyoko, to the point where it was practically a Once an Episode deal. There was even an episode called "Just In Time," but it was much closer to "By A Hair" in the original French (a more fitting pun, since one of the important plot devices was a strand of Aelita's hair ).
 * Although, the most egregious example was probably "Satellite.".
 * In Between the Lions, this is the source of a Punny Name for the protagonist of a book series that one of Lionel's friends likes instead of Cliff Hanger. The apparent structure is that Justin Time is relaxing in a hammock when some random oblivious threat comes along. He gets out of the way just in time, and goes back to relaxing.
 * In Rocky and Bullwinkle's Treasure of Monte Zoom arc, there's a joke about the heroes always showing up in "the 'Ta-da' nick of time," leading Bullwinkle to wait around instead of going to save the day and arriving too early.