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, said she was “elated” and “can’t wait to have him back home”.
The UAE said the pardon was part of a series of orders issued on the country’s National Day anniversary.
Ms Tejada told BBC Radio 4’s Today programme: “It’s taken me by surprise and I’m just so happy and so relieved and really incredulous that it is all happening finally.
“It’s been an absolutely nightmarish seven months already and I can’t wait to have him back home.”
Foreign Secretary Jeremy Hunt called the pardon “fantastic news” and said Mr Hedges could be released “very soon”.
He also praised Ms Tejada, describing her as a “determined lady” who had “fought incredibly hard and been to hell and back”.
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.
A UAE government spokesman said Mr Hedges would be released as soon as “all formalities” were complete.
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, who lives in Exeter, was arrested at Dubai Airport in May.
His family 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 suffered panic attacks.
However, UAE government spokesman Jabel Al Lamki claimed Mr Hedges had been “using two different identities to gather information from his targets”.
He added: “In one he was Matthew Hedges the PhD researcher, in another one he was Matthew Hedges the businessman, he was part-time PhD researcher, and part-time businessman, but he was 100% a secret service operative.”
Mr Al Lamki said a request for clemency from Mr Hedges’ family had been granted “in consideration of the historical relationship and close ties between the United Arab Emirates and the United Kingdom”.
Durham University’s vice-chancellor, Prof Stuart Corbridge, said: “We are absolutely delighted to learn the news of Matt’s impending release.
“It is paramount that he is now allowed to return home to Daniela and his family as quickly and safely as possible.
“We will continue to offer Matt’s family our full support in the aftermath of this traumatic ordeal and we will be thrilled to welcome him back to the Durham University community.”