David Miranda row: What is schedule 7?
The partner of a Guardian journalist who published documents leaked by US whistle-blower Edward Snowden has been held by UK police under schedule 7 of the Terrorism Act 2000.
The detention of David Miranda, the partner of Glenn Greenwald, for nine hours at Heathrow has prompted questions over the use of the law.
What is schedule 7 and how does it work?
Under the schedule, UK police can stop, examine and search passengers at ports, airports and international rail terminals.
Unlike with some other police powers to stop and search, there is no requirement for an officer to have a "reasonable suspicion" that someone is involved with terrorism before they are stopped.
A passenger can be held for questioning for up to nine hours and those detained must "give the examining officer any information in his possession which the officer requests".
Any property seized must be returned after seven days, but data from mobile phones and laptops may be downloaded and retained by the police for longer.
Those detained are compelled to answer questions from the police and must not "obstruct" or "frustrate" any police searches.
If someone fails to co-operate they are deemed to have committed a criminal offence and could face up to three months in prison, a fine or both.'Necessary and proportionate'
The Home Office says schedule 7 "forms an essential part of the UK's security arrangements" and it is for the police to decide when it is "necessary and proportionate to use these powers".
But concerns have been raised about the low threshold required by officers before they stop someone.
According to the Home Office's code of practice on using schedule 7 powers, although its use "is not based on an examining officer having any suspicion" against any individual, "the powers should not be used arbitrarily".
The powers are to be used "solely for the purpose of ascertaining if the person examined is or has been concerned in the commission, preparation or instigation of acts of terrorism," it says.
Selecting someone for questioning should be based on "the threat posed by the various terrorist groups active in and outside the United Kingdom", it says.
"The powers must not be used to stop and question persons for any other purpose."
Officers should base their decisions on factors such as "current and emerging trends in terrorist activity", "individuals or groups whose current or past involvement in acts or threats of terrorism is known or suspected", or "emerging local trends or patterns of travel".
A person's perceived ethnic background or religion must not be used as the sole reason for selecting someone, it says.Government review
Human rights group Amnesty International said schedule 7 "violates any principle of fairness" and the detention of Mr Miranda shows "how the law can be abused for petty vindictive reasons".
And David Anderson QC, the government's independent reviewer of terrorism legislation, has raised questions about the powers - as well as about the "unusual" exercising of it in this particular case.
"Anybody can be stopped under this power, there is no need for the police to believe they are a terrorist or to suspect they are a terrorist," he said.
"The only reason they can talk to them is in order to determine whether they are a terrorist, [but] it seems to me there is a question to be answered about whether it should be possible to detain somebody, to keep them for six hours, to download their mobile phone without any need for any suspicion at all.
"I hope at least it's something that Parliament will look at."
He has pointed out that a number of cases are pending before the courts in London and Strasbourg about the lawfulness of schedule 7 examinations, including their compatibility with human rights legislation.
According to his most recent review, he found schedule 7 was used on 61,145 people in 2012-13 - 12% down on the previous year, and 30% down on 2009-10.
The majority of those examinations lasted less than 15 minutes, and the Home Office says more than 97% of examinations last less than an hour.
There were only 24 terrorism-related arrests after schedule 7 examinations in 2011-12 - 0.03% of those examined.
The government carried out a review of schedule 7 powers in 2012, including a public consultation.
As a result it has introduced a number of reforms, which are currently going through Parliament.
These include allowing those held for longer than an hour to consult a solicitor, a reduction in the time someone can be held from nine hours to six hours, and training and accreditation for all officers using schedule 7 powers.