Edward Snowden, the former US intelligence contractor who revealed in 2013 that the US government was spying on its citizens, has agreed to forfeit over $5 million that he earned from his book, CNN reported. The amount will be paid to the US government as speaking fees, the report said quoting court records.

Snowden’s book ‘Permanent Record’ had come under the scanner last year as he had published it without the US government’s approval. This violated the contracts he had signed with the CIA and the National Security Agency.

Snowden, who has been living in exile in Russia since the revelations, has said he would like to return to the United States — but only on the condition that he receive a fair trial.

The US government has been trying to find ways to hold the former CIA operative accountable for leaking national secrets. The case against his book is one such effort. The federal judge hearing the case sided with the Justice Department and agrees that some of Snowden’s proceeds should go to the government. But the forfeiture plan has not been approved yet.

According to reports, Snowden earned $4.2 million from the sale of his book. He also delivered 56 speeches, from which he earned $1.03 million. The speeches also violated the secrecy agreement he had signed.

Snowden was praised as a whistleblower and privacy advocate by his defenders after he leaked information showing that agents from the National Security Agency (NSA) were carrying out widespread surveillance on citizens.

But the United States accuses him of endangering national security. A conviction on espionage charges could send him to prison for decades.

A push to have him pardoned by Trump’s predecessor, Barack Obama, ultimately failed.