Britain's High Court is due to rule on whether authorities were correct to seize a cache of documents leaked by former National Security Agency worker Edward Snowden as they were being carried through London's Heathrow Airport by the partner of journalist Glenn Greenwald.

Judges have been asked by lawyers for the Guardian newspaper, which paid for the trip, to rule that David Miranda was detained unlawfully under British anti-terror legislation.

The case has angered those who argue that the seizure of the documents was intended to sabotage Greenwald's reporting on the NSA and its British partner, GCHQ.

Greenwald has played a key role in exposing the NSA's vast surveillance programs.

Government lawyers argued the seizure was necessary to prevent the material from falling into the hands of terrorists.