Image copyright Reuters Image caption The arrest of David Miranda (right) prompted calls for a rethink of counter-terrorism law

Powers used by police to hold people at airports without suspicion and download data from their phones or laptops are unlawful, MPs and peers have warned.

So-called Schedule 7 powers were used to detain David Miranda, partner of a Guardian reporter, at Heathrow.

Mr Miranda was believed to be carrying leaked security documents from whistle-blower Edward Snowden.

The Joint Committee on Human Rights (JCHR) welcomed plans to limit the powers but said it was not enough.

Powers to access, search, examine, copy and retain data held on personal electronic devices are so wide as not to be "in accordance with the law", the JCHR said.

'Extraordinarily broad'

It said the government had failed to show a need for the "more intrusive powers" under Schedule 7 of the Terrorism Act 2000.

The Act also permit officers to detain passengers - whether suspicious or not - at ports and airports for up to six hours, as well as take fingerprints and DNA samples.

Analysis The government is committed to tightening up Schedule 7 to deal with concerns about abuse. But the minister responsible for security, James Brokenshire, believes there is widespread support for the basic principle of using stop-and-search powers at ports and airports to protect against terrorism. Even after the publicity surrounding the Miranda arrest in the summer. A senior government source concerned with national security told me they did not expect Parliament to challenge the main provision in Schedule 7 - that no suspicion is needed to stop someone. The police and security services see it as an important tool both for disrupting the activities of suspects and for gathering intelligence on people travelling abroad. The independent reviewer of terror laws, David Anderson QC, has raised concerns about the power to confiscate mobile phones and access their content. The Joint Committee on Human Rights has now echoed those concerns. But the current political climate is unlikely to favour those who want more restrictions on Schedule 7 powers. There is continuing concern over Britons who travel to Kenya and Somalia for terror training - or to and from the civil war in Syria.

The cross-party group of MPs and peers wants a threshold introduced to the more extensive powers so they can be applied only if the examining officer reasonably suspects the person is or has been involved in terrorism.

JCHR chairman Hywel Francis said: "Recent events have brought to the world's attention how extraordinarily broad those powers are.

"They include the power to detain somebody, to take their mobile phone and laptop and download all the information on it, and to take biometric samples, all without reasonable suspicion.

"Most people would be shocked to know that the police have such extensive powers which could be exercised in relation to anyone, whether suspicious or not.

"We make the simple recommendation that the more intrusive powers should only be available where the police have formed a reasonable suspicion that the traveller may be somebody who is involved in terrorism."

The Anti-social Behaviour, Crime and Policing Bill was introduced in the House of Commons in May.

Its report stage in the Commons is scheduled for next week.

'Ripe for abuse'

Section 7 powers recently came under the spotlight after officers used them at Heathrow in August to detain Mr Miranda, the partner of Guardian journalist Glenn Greenwald, who broke the Edward Snowden state surveillance story.

The government's reviewer of terrorism legislation, David Anderson QC, has asked for further details from Scotland Yard and the Home Office about Mr Miranda's detention.

Shami Chakrabarti, director of human rights campaigners Liberty, said: "David Miranda's nine-hour detention lifted the lid on the scandal of Schedule 7 and now one of Parliament's most influential cross-party committees has echoed the growing call for reform.

"But papering over the cracks of this dangerous, overbroad power won't achieve anything - Schedule 7 is ripe for abuse, regularly wielded in discriminatory fashion and must be repealed without delay."

The JCHR is also calling for a proposal limiting compensation for victims of miscarriages of justice to be withdrawn from the Anti-Social Behaviour, Crime and Policing Bill.

It says a clause which would require proof of innocence beyond reasonable doubt as a condition of obtaining compensation for wrongful conviction is "incompatible with the presumption of innocence".

As well as powers to stop, question, search and detain at ports, the Bill also concerns anti-social behaviour, forced marriage and miscarriages of justice.