British academic Matthew Hedges, who was jailed for spying in the United Arab Emirates, has been pardoned with immediate effect.
Mr Hedges, 31, denied spying and said he had been researching his PhD, but prosecutors said he confessed.
His wife, Daniela Tejada, who appealed for clemency, told Reuters that she “cannot wait to have Matt back home”.
The UAE said the pardon was part of a series of orders issued on the country’s National Day anniversary.
Foreign Secretary Jeremy Hunt called the pardon “fantastic news”.
Prosecutors said Mr Hedges had admitted the charges in an Abu Dhabi court, which found him guilty of “spying for or on behalf of” the UK government, and was jailed for life last week.
Mr Hedges had always said he was innocent, and had been researching the country’s security strategy as part of his PhD studies at Durham University.
Mr Hunt tweeted: “Fantastic news about Matthew Hedges.
“Although we didn’t agree with charges we are grateful to UAE government for resolving issue speedily.”
Mr Hedges’ family previously said that during the first six weeks of his detention he had been interrogated without a lawyer and consular access was unavailable.
Despite not speaking Arabic, he was made to sign a document which transpired to be a confession, they added.
Ms Tejada said her husband had been left “absolutely terrified” by the prospect of serving a life sentence in the UAE and was suffering panic attacks.
Mr Hedges, who lives in Exeter, was arrested at Dubai Airport in May.