castle the wild rover ryan seamus dever jenny siobhan abc 'Castle' spoilers: Take a peek into Ryan's past in 'The Wild Rover'

It’s time to find out about Ryan’s past on “Castle.” The cheerful, straight-laced, happily married detective was once a darker guy, and photos and spoilers from “The Wild Rover” help to explain why.

castle 1 the wild rover beckett abc 'Castle' spoilers: Take a peek into Ryan's past in 'The Wild Rover'In the episode, a man is found dead in the industrial cake mixer used in a cupcake shop. Somehow, this murder connects to an Irish gang on Staten Island and to a bar owner named Siobhan O’Doul (guest star Cara Buono).

castle 2 the wild rover beckett lanie abc 'Castle' spoilers: Take a peek into Ryan's past in 'The Wild Rover'What does any of this have to do with Ryan (Seamus Dever)? It seems that, back in the day, Ryan worked undercover as a narcotics detective. He has a past that connects him both to the gang and to Siobhan. In order to solve the murder, Ryan has to risk his life and his marriage by going back undercover.

castle 5 the wild rover ryan jenny%3dsiobhan abc 'Castle' spoilers: Take a peek into Ryan's past in 'The Wild Rover'As you might suspect, Ryan’s past with Siobhan is a romantic one. “He’s got an old girlfriend… who shows up at the Precinct just at the moment his wife is there,” Seamus Dever told us recently. This obviously will not go over well with Jenny (Juliana Dever). “Of course complications ensue with his wife,” “Castle” creator Andrew Marlowe explained. “The two of them are right in the middle of trying to have a baby, so it’s all very fraught and fun.”

castle 6 the wild rover ryan siobhan kiss abc 'Castle' spoilers: Take a peek into Ryan's past in 'The Wild Rover'The episode will be about more than just old romances. Ryan also has to face up to the person he used to be. “When he was undercover, he was a much different guy than the sweater vest-wearing guy we all know,” Marlow teased. Ryan may have done some bad things in those days. As Dever explained it, the situation allows him “to sort of make amends for sort of using someone in his past.”

castle 7 the wild rover jenny ryan abc 'Castle' spoilers: Take a peek into Ryan's past in 'The Wild Rover'While the other detectives are involved throughout the case, “The Wild Rover” will very much be a Ryan episode. “We’re all there to support him,” Nathan Fillion said about the episode. “But there’s not a lot we can do.”

castle 8 the wild rover beckett ryan esposito abc 'Castle' spoilers: Take a peek into Ryan's past in 'The Wild Rover'“The Wild Rover” airs on Monday, March 25 at 10pm on ABC.