A British academic who was jailed for life in the United Arab Emirates has been pardoned.
Matthew Hedges, who was charged with spying on behalf of the UK last week, will be allowed to leave the country once "formalities are complete", a UAE official said.
Mr Hedges is being pardoned alongside 784 other prisoners in the country as part of its 47th National Day, a celebration which marks the union of the seven emirates.
- Read more: Jailing of British academic is an 'utter disaster' for UK-UAE relations, says Crispin Blunt MP
- Read more: United Arab Emirates jailing British student for life is 'absurd', claims Tom Tugendhat MP
The UAE spokesman said the Briton's pardon was in response to an appeal for clemency by his family, as well as protecting the relationship between the UK and UAE.
However, he said Mr Hedges was "100 per cent a full-time secret service operative" who was in the country "to steal the UAE's sensitive security national secrets for his paymasters".
UAE minister of state for foreign affairs Anwar Gargash said the pardon would allow the UAE and UK to "return our focus to the underlying fundamental strength of the UAE-UK bilateral relationship", the WAM Emirates news agency reported.
Foreign secretary, Jeremy Hunt, called the news "fantastic".
He added that news of Mr Hedges' pardon was "bittersweet" given that Briton Nazanin Zaghari-Ratcliffe remains detained in Iran, also accused of spying.
In a tweet, he wrote: "Fantastic news about Matthew Hedges. Although we didn’t agree with charges we are grateful to UAE government for resolving issue speedily.
"But also a bittersweet moment as we remember Nazanin & other innocent ppl detained in Iran.Justice won’t be truly done until they too are safely home."