Britain's High Court has ruled that police legally detained the partner of Glenn Greenwald, the journalist at the centre of the Edward Snowden spying leaks.

The court rejected on Wednesday a legal challenge which argued that the detention of David Miranda, and the seizure of leaked documents, violated free expression.

In a 34-page written judgment, Lord Justice John Laws said the detention "was a proportionate measure in the circumstances" and that its objective "was not only legitimate, but very pressing".

Three judges ruled that officers had acted properly when they invoked Schedule 7 of the UK Terrorism Act 2000 to stop Miranda on August 18, seize encrypted devices and question him for nearly nine hours.

Schedule 7 allows British police to hold and question a person for a limited time, and confiscate electronic equipment, even if there is no evidence of suspicious activity.

Lawyers for the Guardian newspaper, which paid for Miranda's trip from Germany to Brazil, had argued that Miranda was detained unlawfully.

But the government challenged this claim, saying the seizure was necessary to prevent the material from falling into the hands of "terrorists".

Greenwald described his partner's detention as "clearly intended to send a message of intimidation to those of us who have been reporting on the NSA and [its British counterpart] GCHQ".

Source: Agencies