HOLY GORBACHEV! TV Commie cutie KERI gets busy with hunky co-star as deposed REAL hubby is A-OK with horizontal detente!

KERI RUSSELL and Matthew Rhys play a pair of married Russian KGB agents on TV’s “The Americans” – and now life’s imitating art as they’ve become romantically involved with each other off-screen!

The FX series is filled with twists and turns as their characters, Philip and Elizabeth Jennings, manage a network of spies and informants under their control during the final years of the Cold War.

And things are equally complicated in real life, because Keri is still married to her estranged husband of seven years, Shane Deary – and Shane is good friends with Matthew.

But sources say all’s well because Shane approves of the romance.

“Keri, Shane and Matthew are like one big, happy family,” revealed an insider. “Keri and Shane drifted apart romantically, and over the summer they realized that they were better as friends than lovers.

“Then Keri fell for Matthew, and she worried Shane would feel betrayed seeing how the two guys were close friends.

“But Shane is totally cool with it. He knows Matthew is a stand-up guy and trusts him implicitly with their kids.”

Keri, 37, and Shane, a contractor, are parents to a son, River, 6, and a daughter, Willa, 2.

Meanwhile, Keri and Welsh-born Matthew, 39, who also starred on “Brothers & Sisters,” have been spotted around New York City several times since late December. Incredibly, Shane has even joined them for dinner, and they’re all planning a vacation to Hawaii together.

Said the insider: “What could have been an awkward, messy situation has turned into a bizarre Hollywood fairy tale.”