‘The Walking Dead’ confirmed a long-time theory about Rick’s family

(AMC photo via CNN)

(AMC photo via CNN)

(CNN) — Warning: This story contains spoilers from the latest episode of “The Walking Dead.”

Negan certainly took more than his fair share from the residents of Alexandria during his first trip to the compound, but he also inadvertently gave fans a gift: the answer to a question that has been plaguing “Walking Dead” fans for a long time.

In Sunday’s episode, viewers learned that Rick’s best friend Shane (Jon Bernthal), is the father of baby Judith — and Rick knew this the whole time.

“I know Judith isn’t mine — I know it,” Rick (Andrew Lincoln) told Michonne (Danai Gurira) in an emotional scene. “I love her. She’s my daughter but she isn’t mine.”

When they were alive, Shane had questioned Lori (Sarah Wayne Callies), with whom he had a relationship while Rick was in a pre-series coma, whether he was her unborn baby’s father, but she denied it. Questions about the baby’s true paternity remained long after both characters died.

Followers of the series have speculated Shane was the baby’s father for some time.

Rick made the reveal to Michonne while trying to explain to his better half why he has been so seemingly fine with turning control and power over to antagonist Negan.

Their conversation came toward the end of an episode in which Negan paid a visit to their community and walked away with all their guns, mattresses and many goods. He also threatened to kill one of their friends and put on quite the public show to assert his power over Rick.

Rick explained to Michonne that he had to accept the truth about Judith’s paternity and move on “so I could keep her alive.” He’s taking the same approach with Negan, he said.

“I’ll die before she does and I hope that’s a long time from now so I can raise her, protect her, and teach her how to survive,” he said. “This is how we live now. I had to accept that, too, so I could keep everyone else alive.”

Lincoln said on “The Talking Dead,” AMC’s after show, that producers had told him about the upcoming reveal long before the current season started shooting.

“It blew my mind,” the actor said. “I think that was a brilliant way of explaining what Rick was enduring and capable of enduring.”

“The Walking Dead” airs Sundays on AMC.