David Miranda, "partner" of guardian journalist Glenn Greenwald who reported on the Edward Snowden NSA leaks, was detained by the police for nine hours while passing through Heathrow on his way home to Brazil. Powers under the Terrorism Act 2000 were used.
These powers are substantial. A person may be detained if (a) he is at a port [including an airport] or in [a] border area, and (b) the [...] officer believes that the person’s presence at the port or in the area is connected with his entering or leaving Great Britain or Northern Ireland or his travelling by air within Great Britain or within Northern Ireland. [Terrorism Act 2000, Schedule 7, Section 2]
There is a maximum detention period of nine hours and during this the detained person is legally required to answer all questions the detaining officer asks - no right to silence applies. The detained person's property may be taken away and held for seven days. Legally the officer may pull hair out by the roots from the detained person's head; may take fingerprints and photographs and may arrange for a doctor to take samples such as blood and dental impressions.
There is no requirement for terrorism to have occurred or be suspected.
These powers are draconian and are a legacy of the ultra-authoritarian Blair/Brown government. At the moment we do not know why the police chose to subject David Miranda to this treatment - one must suspect that it is an attempt to put indirect pressure on Greenwald himself.
One can only hope that this heavy-handed (but lawful) operation will cause such such a public outcry that the Terrorism Act act has to be revised.