LONDON (AP) -- A British court ruled Thursday that if national security issues are at stake, the U.K. government may look through items seized from the partner of a journalist who has written stories about documents leaked by former National Security Agency contractor Edward Snowden.
Lawyers for David Miranda, the partner of Guardian reporter Glenn Greenwald, took comfort from the ruling, which gave the newspaper an injunction against the government but added a very broad exception for national security issues. The government, however, was jubilant.
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.
British authorities had seized several items from Miranda — including a computer, memory sticks, DVDs and a cellphone — when they detained him at Heathrow Airport on Sunday. Lawyers for the paper said the items contained confidential information and asked the High Court to prevent the government from "inspecting, copying or sharing" the data.
"Confidentiality, once lost, can clearly never be restored," Miranda's lawyer, Gwendolen Morgan of the Bindmans law firm, said in a statement before the hearing Thursday.
But the court decided to let the government view the items on condition the material was being examined on "national security" grounds. The injunction runs until Aug. 30, when a court will hold a hearing and consider the issue.
Morgan claimed a partial victory in the ruling, arguing that the government now has seven days to "prove there is a genuine threat to national security." But the exception granted by the court dampened enthusiasm, and Morgan said lawyers would consider whether or not to appeal.
Cathryn McGahey, a legal expert with Temple Garden Chambers in London, said Miranda's lawyers had failed to keep his data out of police hands.
"The object they were seeking as quickly as possible was the prevention of the police going through this material and they haven't achieved that," she told The Associated Press.
The attorney representing British police, 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," Laidlaw 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."
The Home Office issued a statement praising Thursday's ruling.
"We are pleased the court has agreed that the police can examine the material as part of their criminal investigation insofar as it falls within the purposes of the original Schedule 7 examination and in order to protect national security," it said.
The 28-year-old Miranda was returning home to Brazil from Germany when he was detained at Heathrow and London police have argued the move was "legally and procedurally sound."
In Germany, Miranda had met with Laura Poitras, a U.S. filmmaker who has worked with Greenwald on the NSA story.
Miranda and Greenwald live together in Brazil.