The Brazilian partner of a British journalist who wrote stories about leaked documents by Edward Snowden is claiming partial victory in a ruling by a British court.

David Miranda, the boyfriend of Guardian reporter Glenn Greenwald, is suing British authorities who seized his belongings when they stopped him at London's Heathrow Airport last as he was heading back to Brazil.

Lawyers for Miranda argued the court should prevent the government from "inspecting, copying or sharing" the data.

Instead, the court decided to allow the government to view the items on the condition the material be being examined on "national security" grounds. The injunction runs until Aug. 30.

But Miranda's lawyer, Gwendolen Morgan of the Bindmans law firm, claimed a partial victory in the ruling, arguing the government now has seven days to "prove there is a genuine threat to national security."

"Confidentiality, once lost, can clearly never be restored," Morgan had argued at the hearing. "If interim relief is not granted, then the claimant is likely to suffer irremediable prejudice, as are the other journalistic sources whose confidential information is contained in the material seized."

Greenwald has written about NSA programs in the United States using files disclosed by Snowden, who now has temporary asylum in Russia. The Obama administration wants Snowden to face trial in the United States for the leaks.

The attorney representing British police at the hearing, Jonathan Laidlaw, made clear Thursday that police were already scanning through the tens of thousands of pages of digital material they had seized from Miranda — and were only partway through it. He insisted the material was of significant concern to national security.

"That which has been inspected contains in the view of the police highly sensitive material, the disclosure of which would be gravely injurious to public safety and thus the police have now initiated a criminal investigation," he said. "There is an absolutely compelling reason to permit this investigation to continue."

It was the first public disclosure of such a criminal investigation tied to the materials seized over the weekend. Asked what she knew about that investigation, Morgan said: "Very little. We don't know of any basis for that."

London police have argued that Miranda's detention was "legally and procedurally sound." Home Secretary Theresa May has defended the police, saying they were right to act if they "believe someone has in their possession highly sensitive stolen information that could help terrorists, that could lead to a loss of life."

May's attorney, Steven Kovats, says she opposed the injunction the Guardian wanted because it was important to look at the documents "without delay in the interests of national security."

Lord Justice Jack Beatson asked whether examining the data now arose from a need to "counter any threat." Kovats said in broad terms, the answer was "yes."

The 28-year-old Miranda was returning home to Brazil from Germany when he was detained. In Germany, he had met with Laura Poitras, a U.S. filmmaker who has worked with Greenwald on the NSA story.

Based on reporting by The Associated Press.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino