Castle/Recap/S3 E24 Knockout

Beckett is at the prison for her weekly interview with Hal Lockwood...only Lockwood's been put into general population. There he kills Gary McCallister, John Raglan's partner and accomplice in the case that led to Beckett's mother's murder. At the arraignment, three accomplices disguised as cops break Lockwood out. A phone call Lockwood made a few days before leads them to the conclusion that he was broken out to continue the cleanup mission, meaning that there's still someone left to be silenced: A third officer.

As they track both Lockwood and the mystery officer, Beckett's mood deteriorates rapidly, diving into the case with abandon and getting more and more frustrated with each false lead: First with a prison guard who was paid to transfer Lockwood to general population, then with nothing forthcoming on the third cop. A small break comes when Castle finds that some police records with Raglan and McCallister in them are forged, but Castle isn't happy with Beckett's disposition, eventually culminating in a fight that leaves her wanting Castle out of the 12th Precinct.

Digging through the archives leads Ryan and Esposito to a retired record room keeper, whom they eventually track down to a cop bar that he owns. He knows of Raglan and McCallister, but didn't hang out with them, although he knows a young black rookie who did: Captain Montgomery, the third officer, who's just been targeted by Lockwood to give Beckett to him to kill. Instead, he uses her as bait to lure Lockwood to an airport hangar, where he can make his last stand, and though Beckett wants to stand with him, he has Castle carry her out. He then kills Lockwood and his men, though he's mortally wounded in the act.

It is agreed by Beckett, Castle, Esposito and Ryan that they will keep Montgomery's role as the 'third cop' secret in honor of the lengths he went in order to atone for his actions. At Montgomery's funeral, Beckett gives a stirring eulogy--but is suddenly shot down by a sniper. Rick Castle's last words to her before she spirals away from him: ""I love you. I love you, Kate."

Tropes

 * Anguished Declaration of Love: Castle declares his love over Beckett, who's in shock after being shot.
 * The Atoner: Montgomery is revealed to be this.
 * First-Name Basis: "Kate" and "Rick" are used by Castle and Beckett more in this episode than in the rest of the series combined.
 * Ironic Echo: At the arraignment, Beckett says to Lockwood that his boss can't hide from her. He tells her she's got it ass-backwards: she can't hide from him. At the end, in the hangar, Lockwood tells Montgomery that Beckett can't hide from him. Montgomery tells him he's got it ass-backwards: he can't hide from Montgomery. Cue firefight.
 * Nothing Up My Sleeve: Montgomery's last act is to draw a gun he'd hidden in his sleeve and shoot Lockwood dead.
 * Meaningful Echo: Beckett's eulogy to Montgomery gives the line he'd told her earlier: For us, there are no victories, there are only battles. And in the end, the best you can hope for is to find a place to make your stand."
 * Mutual Kill: The last shot between Lockwood and Montgomery.
 * Pre-Ass-Kicking One-Liner: Montgomery's use of "You've got that ass-backwards" in the Ironic Echo above.
 * Redemption Equals Death
 * Tonight Someone Dies
 * The Un-Reveal / Failure Is the Only Option: We still don't know who's behind the entire conspiracy. And though Montgomery has "seen to it" that "he" supposedly can't hurt Beckett...
 * Wham! Episode
 * You Shall Not Pass