The following contains spoilers for The Rookie, Season 4, Episode 22, "Day in the Hole," which aired Sunday, May 15 on ABC.

The Season 4 finale of The Rookie had Nathan Fillion's Officer John Nolan assigned to special duty in the pokey border town of Frontera, filling in for the local sheriff and supervising rookie deputy Gabrielle Navah (Stephanie Arcila). Sound like a setup for a modern Western or an action movie? Because that's the clever payoff viewers got from Nolan's story in the episode, "A Day in the Hole."

Relegated to a week away from Los Angeles, as punishment for crossing the union president, Nolan decides to make the best of it with a friends and family vacation. He brings his girlfriend Bailey (Jenna Dewan) and invites Ellroy Basso, portrayed by Alan Tudyk, and Nell Forester (Sara Rue) to tag along as well. Nolan's half-brother Pete (Pete Davidson) and Pete's girlfriend, Chastity (Meg DeLacy), arrive later in an airstream trailer and everyone ends up at the strangely deserted, local motel. A classic framework that sets up the rest of the storyline.

RELATED: The Rookie Spinoff Picked Up By ABC

Nolan, Ellroy and Bailey in The Rookie

Because Frontera is as slow paced as it gets, it appears Nolan will have nothing more than local bar fights to worry about; the town's so small that the police station shares space with the local diner. On patrol, Navah wants to know all about Nolan's exciting cases, which he tries to downplay, but Navah is enthused to be working with a Los Angeles police officer. Of course, that languid pace and enthusiasm doesn't last, not when they pull over a car for a speeding violation and find a driver with no license or registration. Nolan spots a gun, and the man is taken into custody, but not before Navah gets reprimanded for being out of position and in the line of possible gunfire.

Back at the diner/station, the suspect, "John Smith," is booked, but a record check can't be done until morning due to limited access to the database. Nolan leaves Navah to watch the suspect overnight, returning to the motel for some relaxation and bonding time. In the morning Nolan and Ellroy head back to the station, where they find out the suspect is wanted by the Bureau of Alcohol, Tobacco, Firearms and Explosives. Cue the cinematic climax music, because things are about to get wild.

A stranger saunters into the diner with a duffel bag of cash and asks for the release of the prisoner, his boss. The scenario shifts to the incorruptible Nolan having none of it, despite both veiled and overt threats. Nolan makes his stand, but Ellroy amusingly suggests they take the money and let the suspect go; he even reaches for the bag when the thug retrieves it, vowing to return.

RELATED: The Rookie Gave Chen and Bradford Fans a Chenford Kiss

John Nolan The Rookie

The situation then turns into the free-for-all showdown and Western-style standoff it's been promising, pitting heavily armed thugs against Nolan, Navah and Ellroy. The bad guys riddle the diner with gunfire, hitting crockery and coffee pots, and making one delicious-looking cake do a graceful somersault through the air. More quips, one-liners and banter fly as well, as Nolan and company fight against the odds in a comedic clash complete with life-saving close calls and Ellroy taking down one of the thugs with tai chi.

Meanwhile, back at the motel, Bailey takes on not one, but two bad guys in fight scenes that would be at home in any action movie -- all while Pete is sleeping in his trailer, and right before Chastity and Nell saunter in from shopping. In the aftermath, backup finally arrives in the form of federal authorities, and the explanation cuts away to a scene of all the bad guys packed into the small cell that serves the police station.

The Rookie has been renewed for a fifth season, which is likely to premiere this Fall.