The partner of a Guardian journalist who revealed mass surveillance by spy agencies in the UK and US has won a temporary legal battle against the authorities.
David Miranda's legal team secured an injunction at the High Court preventing the government from examining data seized from him except 'for the purposes of national security'.
Mr Miranda was detained at Heathrow without charge for 9 hours under anti-terrorism legislation and had his laptop confiscated, along with two memory sticks, a mobile phone and a video games console.
His lawyers have secured a temporary injunction until August 30th, after which the court will examine the legality of the seizure.
Matthew Ryder, QC for the Brazilian – who is the partner of Guardian journalist Glenn Greenwald – told the court: "At its heart this is about the seizure of journalistic materials from somebody working with a journalist."
He added that the use of schedule 7 of the Terrorism Act 2000 was inappropriate and allowed the authorities to circumvent existing laws that would have afforded Mr Miranda adequate legal protection.
The court order was granted by Lord Justice Beatson and Mr Justice Kenneth Parker.
Gwendolen Morgan, representing Mr Miranda, stated outside the court that the government now has a window of seven days to prove that the documents in Mr Miranda's possession constitute a threat to the UK's national security.
Mr Miranda was travelling through Heathrow on his way to Rio de Janeiro after visiting Laura Poitras, a filmmaker who helped bring to light the information gathered by whistleblower Edward Snowden, in Berlin.
Former Lord Chancellor Lord Falconer, who helped put together the Terrorism Act 2000, told the BBC that it was his belief that the wrong laws had been invoked to detain Mr Miranda.
He said that while the state is concerned about national security, it was going about things in the wrong way.
"Use the powers they've got to deal with that, don't use these powers, which are intended to be used only against people who are or might be terrorists," Lord Falconer stated.