David Michael Miranda, a Brazilian citizen and the partner of the American journalist Glenn Greenwald, who lives in Brazil, was held Sunday at London’s Heathrow Airport for nine hours, the maximum allowed by law, before being released without charge. He said Monday that all of his electronic equipment, including his laptop computer and cellphone, had been confiscated.
Mr. Miranda was traveling from Berlin to Rio de Janeiro. In Berlin, he had met with Laura Poitras, an American filmmaker who has worked with Mr. Greenwald on the Snowden leaks about secret American and British surveillance programs that they argue violate individual rights and liberties.
The United States claims it had nothing to do with this. The British government hasn’t explained why it used an extremely broad anti-terrorism law to hold Miranda. (“It is for the police to decide when it is necessary and proportionate to use these powers,” a Home Office spokesman told The New York Times.)
Greenwald says British authorities are going to “regret what they’ve done.” And a conservative newspaper columnist in Britain warns that everyone should be paying closer attention to Schedule 7 of that country’s Terrorism Act 2000, because “they can do it to you, too.”

They detained him because he was traveling with stolen national security documents. He was acting as a courier between Greenwald and his partner in Berlin. His trip was paid for by the Guardian.
He was detained under a terrorism law because the leaked NSA programs (whatever their faults and transgressions) are nominally aimed at fighting terrorism. So, under what you admit is a very broad law aimed at fighting terrorism, this courier of stolen documents was stopped and those documents, which the UK and US govts (rightly or wrongly) think can aid terrorism by revealing to terrorists how we track them, were taken from the courier.
And that is why Glenn Greenwald’s partner, who Greenwald intentionally and knowingly used as a paid courier of stolen national security documents across international borders, was detained and any media which might contain secret documents was seized.