Most Britons support the law that was used to detain David Miranda at Heathrow - but there is widespread concern at the way police used the law on this occasion against the partner of Guardian journalist Glenn Greenwald, who was held for nine hours without charge.
Just 37% of the 1,858 British adults questioned by YouGov agreed that it was appropriate to detain Miranda on the grounds that the information he was carrying, which related to NSA whistleblower Edward Snowden, would be useful to terrorists.
The action was considered a "generally inappropriate use of the law" by 44% of voters, while 19% said they did not know.
Miranda, a Brazilian national, was detained by British police as he passed through the transit lounge of Heathrow airport on his way from Berlin to Rio. He was held for nine hours - the maximum time the law permits without charge or arrest - and questioned on data he was carrying on his laptop, mobile phone and memory sticks, all of which were confiscated and may be kept for up to seven days.
Schedule 7 of the Terrorism Act 2000 can only be used in British ports and the transit lounges of airports. Although Miranda is not a journalist, his flights were paid for by the Guardian newspaper, and while in Berlin he met American filmmaker Laura Poitra, with whom he exchanged documents given to him by Greenwald and relating to the Edward Snowden leaks.
By a majority of 47% to 38%, voters in the YouGov survey thought it was unreasonable for the police to threaten Mirana with jail, as he has claimed, if he would not disclose the passwords to his computer and mobile phone.
The confiscation of his belongings was considered by 50% of voters as unreasonable, compared with 33% who said it was acceptable.
Some 42% of voters agreed that changes should be made to Schedule 7 of the Terrorism Act 2000. The majority believed the law should be tightened so that its powers may be used only where a "reasonable suspicion of involvement in terrorism" is present.
A third said the law should be kept as it is, while 12% said Schedule 7 needs to be extended, giving police the power to detain anyone in Britain - not just in the transit areas of ports and airports - and seize their computer and mobile phone, without needing "reasonable suspicion" of a crime being planned or committed.
It has been reported that David Cameron instructed the intelligence services to recover computer drives possessed by the Guardian and containing files leaked by Edward Snowden.
A second YouGov survey, this time answered by 650 respondents on 21 August, revealed a slim majority of 39% believed the Prime Minister's request was made because he was concerned that the files contained information that might help terrorists, and he wanted to prevent this falling into the wrong hands.
A minority of 34% thought Cameron asked for the files to be taken from the Guardian because he was angry that the newspaper had the information, and wanted to curb its reporting of the Snowden files.
The Prime Minister's actions have raised questions concerning the freedom of the press, and when a story is deemed public interest or a threat to national security.
Of the 650 Britons questioned, a majority of 43% said Cameron was right to instruct the intelligence services to take action, as he is ultimately responsible for the nation's security; 25% said no politician should get involved in such decisions, which should be left to the police or intelligence agencies.
A minority of 15% said the action against the Guardian was wrong, whoever authorised it, while 18% said they did not know.
Finally, the Guardian argues that it is in the public interest to publish the files leaked by Snowden, and that it is not publishing anything that might put lives at risk or aide terrorism; 42% of respondents agreed and said the Guardian should publish its stories, as the public has a right to know about the surveillance activities of the British and American intelligence agencies, while 38% said no, the newspaper is handling stolen information, cannot be sure what might help terrorists, and it should not be publishing the stories.