The US government has filed a lawsuit against former National Security Agency contractor Edward Snowden.

It alleges Snowden violated non-disclosure agreements by publishing a memoir without giving the US government an opportunity to review it first.

The US Justice Department is seeking to “recover all proceeds” from Snowden’s book, which has just been released.

Snowden published his book, Permanent Record, without submitting it for a pre-publication review, in violation of non-disclosure agreements he signed with both the NSA and the Central Intelligence Agency, the Justice Department alleges.

In his memoir, Snowden tells his life story in detail for the first time and explains why he chose to risk his freedom to become perhaps the most famous whistleblower of all time.

It offers an expansive account of how he came to reveal secret details about the US government’s mass collection of emails, phone calls and internet activity in the name of national security.

Snowden was charged under the US Espionage Act. He now lives in Russia in order to avoid arrest.

Assistant attorney general Jody Hunt said: “The United States’ ability to protect sensitive national security information depends on employees’ and contractors’ compliance with their non-disclosure agreements, including their pre-publication review obligations.

“We will not permit individuals to enrich themselves, at the expense of the United States, without complying with their pre-publication review obligations.”

The Justice Department is not attempting to limit the book’s distribution, but is asking a federal judge to allow the government to collect all the proceeds from the book.

The book’s publisher was also named in the lawsuit. The government is suing the publisher to ensure that no funds are transferred to Snowden while the case plays out, the Justice Department said.