The US government is entitled to every cent Edward Snowden earns from publishing his memoir, Permanent Record, a federal judge ruled on Tuesday. During his employment at the CIA and NSA, Snowden signed contracts promising to seek pre-clearance from those agencies before publishing any book or other publication containing classified materials. If he failed to do so, the contracts said, Snowden would forfeit any proceeds to the federal government.

Snowden is still in exile in Russia, where he has been stranded since 2013. The classified documents Snowden leaked to multiple journalists that year sparked an intense debate over US surveillance practices and inspired some modest reforms. Snowden faces near-certain prosecution for espionage if he returns to the US.

The US Department of Justice filed a lawsuit on September 17, the day Snowden's book first went on sale, seeking to seize Snowden's book profits. On Tuesday, just three months later, Judge Liam O'Grady granted the government's motion for summary judgment.

Snowden's lawyers had asked O'Grady to allow the case to move forward to the discovery phase, where each side could conduct fact-finding related to the case. They argued that more information was needed to establish whether the US government had singled Snowden out for special treatment in administering the pre-clearance process.

But O'Grady rejected that request, arguing that the contracts were clear and the key facts of the case were not in serious dispute. The contracts required Snowden to get pre-clearance, and those requirements were still in effect, the judge held. Snowden had not sought pre-clearance, yet he published a book full of classified information anyway.

The judge also ruled that Snowden had breached his contractual responsibilities by giving speeches at the TED conference and other venues. Each of these speeches included slides with materials that were marked as classified. Snowden argued that he shouldn't be held responsible for re-publishing information that was already in the public domain, but the judge rejected that argument, saying that there was no such limitation in the agreement.

"Both the CIA and NSA secrecy agreements prohibit unauthorized publication of certain information, and Permanent Record discusses those types of information," O'Grady wrote. As a result, "the government is entitled to summary judgment."