By Mandi Bierly
Updated June 17, 2014 at 06:00 PM EDT
Courtesy John Dahl

There were a lot of great scenes in Justified‘s fifth season: Art being badass in the diner, the United Nations of A–holes, and Dickie Bennett’s map monologue come to mind. But it’s Danny Crowe (AJ Buckley) finally testing the 21-Foot Rule on Raylan (Timothy Olyphant) that made Entertainment Weekly‘s list of the 50 best TV scenes of the year, which can be found in the issue now on stands.

At last we were going to see if a knife-wielding nutjob really would win a duel with a gunslinger if he charged him from a distance of 21 feet or less. But in an abrupt and uproarious twist, Danny takes a few steps, falls headfirst into the grave dug for his beloved male dog, Chelsea, and stabs himself through the chin instead. As showrunner Graham Yost told EW in our weekly postmortem, Olyphant had been pitching the death since the start of the season: “He wanted the dog to die. He wanted a grave to be dug. And he wanted Danny to fall in it,” Yost said. “And it’s suggested by something in Out of Sight, one of the great Elmore Leonard film adaptations. There’s a scene in the climax where this character named White Boy Bob is running up the stairs with a gun, and he trips and falls and shoots himself in the head. It’s actually not in Elmore’s book, I don’t think. It was something that was suggested by someone on the set. But it felt very Elmore, and we’ve always loved that moment. So it’s a little bit of our tribute to White Boy Bob.”

Yost and fellow EP Fred Golan happened to be in a meeting with Olyphant when Taylor Elmore, who cowrote the episode with Keith Schreier, called them into his office to view director John Dahl’s storyboards for the scene. Check them out for yourself below. “There was a giddiness,” Yost recalled. “The way Dahl shot it with those feet sticking up, you know, that’s Elmore. It’s funny and it’s horrifying.”

Courtesy John Dahl

Olyphant couldn’t have been happier with how it all turned out: “Apparently on the night that they were shooting that scene, Olyphant couldn’t stop laughing. He was laughing during AJ’s takes. He was laughing when the stuntman was doing it. He was laughing when it was his stuff. He just got such a kick out of it,” Yost said. Buckley was equally amused: “To have this tension with these characters, and the big emotional charge, and then to f–kin’ laugh, I think, is absolutely brilliant,” he told EW. “It’s so out of nowhere. You’re like, ‘What the f–k just happened?’ And I love it when Raylan’s like [ ‘S–t, Danny. I would’ve said somethin’. I swear to God I didn’t see it either.’] I think [Tim] kinda made that up there, and we were just laughin’. He’s so sincere…. [I]f there was ever a way to die on a show and go out, this was it.”