"24 Minutes" is the twenty-first episode of The Simpsons' eighteenth season and was broadcast on May 20, 2007 as part of the one hour season finale, alongside the episode "You Kent Always Say What You Want". It was originally promoted as being the 400th episode, but was broadcast as the 399th. It was written by Ian Maxtone-Graham and Billy Kimball. It was Kimball's first writing credit.
The episode is a spoof of the Fox television drama 24, and sees Principal Skinner's new Counter Truancy Unit (CTU), led by Lisa Simpson, attempting to prevent a stink bomb being released at Springfield Elementary School. Guest stars include Kiefer Sutherland and Mary Lynn Rajskub as their characters from 24, Jack Bauer and Chloe O'Brian. It won the 2008 Annie Award for Best Writing in an Animated Television Production.
To tackle misbehavior, Principal Skinner opens a CTU – Counter Truancy Unit – at Springfield Elementary School with Lisa heading up the operation over Milhouse, Martin and Database. When the bullies Jimbo, Dolph and Kearney play truant, Milhouse is assigned on a mission to spy on them. At the Power Plant, Homer is found to be the owner of a container of expired and highly pungent yogurt and is ordered to dispose of it. Homer tries to return the yogurt to Apu, but Apu refuses to take it due to its unbearable stench and, desperate to get rid of it, takes Homer to the yogurt section and offers him whatever he wants there. While Homer and Apu are distracted, the bullies take the yogurt. Outside, Homer unwittingly breaks Milhouse's cover, and the bullies throw them both in a trash container and send it rolling down an avenue.
Meanwhile, Marge discovers that there is a bake sale at the school that day, and realizes she has just 27 minutes to make a cake. In order to save time, she drastically increases the oven temperature to 1,200 degrees, quickly burning the cake and making it rock-solid. Marge desperately attempts to cover it up with pink and white frosting before rushing to the bake sale.
Lisa suggests that Bart help them, though he only agrees after negotiating immunity from punishment for all his past and future pranks (and making Skinner teach him a new swear word). At Jimbo's house, the bullies make a powerful stink bomb (which resembles the canisters of Sentox Nerve Gas from season 5 of 24) from the expired yogurt and a variety of other putrid items, and plan on detonating it at the bake sale. During his investigation, Bart's phone call is accidentally crossed with a call from Jack Bauer of 24, who is busy in a gun battle, and turns it into a prank call against him ("Ahmed Adoudi").
Bart finds out about the stink bomb and informs Lisa. Upon returning to school, he discovers that Martin is a double-agent working for the bullies. Before Bart can tell Lisa about Martin's double-dealing, Martin knocks him unconscious and takes him to the ventilation room, where the bullies tie up Bart. When Willie stumbles upon the bullies, they overpower him and tie him up too. The bullies then return Martin's ant farm, which they had used to blackmail him into working for them, but Martin is devastated to learn one of their ants has joined the bullies' cause. Later, he hangs himself by his underwear on a clothing hook, giving himself a wedgie after putting on his hall monitor sash (as an homage to the suicide in A Few Good Men as well as that of the character Walt Cummings on Season 5 of 24, who is murdered and has his death framed as a hanging).
At the bake sale, the bullies start the three-minute timer for the bomb. Bart, still tied up, manages to contact Lisa by his cell phone, telling her to have Skinner dump the hot dog water to short circuit the ventilation fan. Skinner starts filling up the room with the water. Running out of air and floating dangerously close to the sharp ceiling fan blades, Bart swims down with the chair tied to his back to the room's only window, which faces the bake sale room. Chief Wiggum is unable to shoot through the bulletproof glass, but Marge then throws her burnt cake like a discus through the window, breaking the windows and allowing Bart, Willie, the bomb, and all the water to flood into the room. Lisa defuses the bomb with one second to spare. Bauer and his CTU SWAT Team then arrive to arrest Bart for crank-calling him, having diverted all CTU's resources into finding him. As he says that, a nuclear bomb explodes in the distance, but to the crowd's relief Bauer assures them that it went off in neighboring Shelbyville.
The title is a reference to the Fox show 24. The episode includes many of the show's hallmarks, such as the multiple split screens, the timer before and after the commercial break, and extended opening credits running over the opening scenes of the narrative. 24 characters Jack Bauer and Chloe O'Brian, voiced by their original portrayers, make cameo appearances. Also the bullies are seen delivering the stink bomb in janitors jumpsuits like the bomb is delivered in Law Abiding Citizen. 
Robert Canning on IGN named "24 Minutes" the best episode of the season and gave it a 9.6/10 saying "this smart, funny, spot-on parody of 24 was so good that it came very close to redeeming the entire season." He also stated "Though much of Season Eighteen was quite mediocre, "24 Minutes" ranks up there with the best of all time". In 2007, Simon Crerar of The Times listed Sutherland's performance as one of the thirty-three funniest cameos in the history of the show. In 2012, Johnny Dee of The Guardian listed the episode as one of his five favorite episodes in the history of The Simpsons. He wrote: "One reason why The Simpsons has remained so watchable is that its parodies are getting sharper – The Departed in Debarted, The Da Vinci Code in Gone Maggie Gone. None though can top this excellent riff which begins with Kiefer Sutherland announcing 'Previously on 24… I mean The Simpsons,' and dispenses with its normal format completely for an entire episode of split-screen thrills, torture and cake baking." James Greene of Nerve.com however, put the episode eighth on his list Ten Times The Simpsons Jumped the Shark, criticizing that "this by-the-numbers Simpsons parody of FOX's number-one crime drama stank of cross promotion".
- Elber, Lynn (2006-09-09). "'Simpsons'Honcho: 'Let's Keep Doing It'". Fox News. Retrieved 2006-09-08.
- Awards for The Simpsons at the Internet Movie Database
- Anthony C. Ferrante (2007-05-08). "Exclusive: 'THE SIMPSONS' AL JEAN CELEBRATES 400 EPISODES (AND A '24' PARODY) AND THEY STILL HAVEN'T RUN OUT OF IDEAS". iF Magazine. Archived from the original on 2007-09-27. Retrieved 2007-06-14.
- Canning, Robert (2010-07-07). "The Simpsons: 20 Seasons, 20 Episodes - TV Feature at IGN". Tv.ign.com. Retrieved 2010-12-22.
- Canning, Robert (2007-06-14). "The Simpsons: Season 18 Review". IGN.com. Archived from the original on 22 June 2007. Retrieved 2007-06-15.
- Crerar, Simon (2007-07-05). "The 33 funniest Simpsons cameos ever". The Times. Retrieved 2010-08-09.
- Dee, Johnny (2012-01-13). "The Simpsons at 500: what are your favourite episodes?". The Guardian. Retrieved 2012-01-14.
- James Greene Jr. (2010-05-06). "Ten Times The Simpsons Jumped the Shark". Nerve.com. Retrieved 2012-01-23.