Lionsgate has optioned the TV rights to bestselling British author Ben Macintyre’s new biography, “A Spy Among Friends: Kim Philby and the Great Betrayal.”

The book examines the life of Kim Philby, a master spy who rose to head Britain’s counterintelligence against the Soviet Union during the height of the Cold War — all while secretly working for the enemy.

While the spy’s life provides an abundance of material, Macintyre’s account focuses on Philby’s relationships and betrayals of his two closest friends in the intelligence world, Nicholas Elliott of MI6 and CIA intelligence chief James Jesus Angleton.

Oscar-nominated screenwriter Bill Broyles (“Flags of Our Fathers,” “Jarhead,” “Apollo 13”) is set to write the adaptation. Allison Shearmur will exec produce alongside Broyles.

The project comes after a trend in shows about spies saw the launch of programs such as FX’s “The Americans,” Showtime’s “Homeland” and, just this month, AMC’s “Turn,” about espionage during the American Revolution.