The spy whose daring exploits as an FBI agent-turned-informant for the Soviets so fascinated the public that bestsellers were written and movies were made about his exploits has died.

Robert Hanssen was found dead on Monday in his prison cell in the United States Penitentiary Florence, having served over two decades of a life sentence without the possibility of parole after pleading guilty to espionage and conspiracy to commit espionage, reported The New York Times.

The cloak and dagger story of Robert Hanssen has intrigued the public because of the double life he led. Hanssen was a family man with six children and was held in high esteem as a member of Opus Dei. But just a few years after joining the FBI and being assigned to a counterintelligence unit, Hanssen began spying for the Soviet Union.

Hanssen’s work with the counterintelligence unit gave him ample access to information that would be of value to the Soviets. The Soviet Union’s security agency, the KGB, and its post-Soviet successor, the SVR, rewarded Hanssen for this information with at least $600,000 in cash and diamonds, reported The New York Times.

Hanssen’s spycraft lasted so long partly because he took extensive measures to avoid being caught. According to the FBI, not even his Russian handler knew his real name or where he worked. He used coded communication to arrange the handover of classified documents. But when he was arrested and questioned, he told investigators that the lack of security at the FBI constituted “criminal negligence,” per the NYT.

When he was finally caught in 2001, the FBI characterized Hanssen’s actions as representing “the most traitorous actions imaginable against a country governed by the Rule of Law,” according to the FBI’s website.

Hanssen’s treason was so long-lasting and brazen that it spawned two movies, including one where he was played by William Hurt and another starring Chris Cooper as Hanssen and Ryan Phillippe as Eric O’Neill, the FBI investigator who helped take him down.