A Norwegian woman at the centre of a Dubai rape case dispute has been pardoned and is free to leave Dubai, she has said.
Interior designer Marte Deborah Dalelv, 24, was on a business trip in Dubai when she says she was raped in March.
She reported the attack to the police, but was charged with perjury, having extramarital sex and drinking alcohol, receiving a 16-month prison sentence.
The case has angered rights groups and the Norwegian authorities.
Ms Dalelv has had her passport returned and was free to leave the country, a Norwegian official told the BBC. She was not being deported, and was expected to return to Norway in the next few days.
The designer, who has been staying at the Norwegian Seamen's Centre in Dubai since she was sentenced last week, told the BBC she found out she was to be freed earlier on Monday during a meeting with public prosecutors.
"We came in and we sat down and they told us 'You've been pardoned'. It's from the ruler of Dubai. It's from him personally so that's - it just feels unbelievable - it's a very, very good day."
Her travel documents had now been returned to her and she was preparing to leave Dubai as soon as possible, Ms Dalelv said.
In Norway, Foreign Minister Espen Barth Eide tweeted: "Marte is released! Thanks to everyone who signed up to help."
The Norwegian government said it had been in daily contact with the Dubai authorities through diplomatic and official channels since Ms Dalelv was sentenced - arguing the jail term represented a human rights violation.
Ms Dalelv went public about the sentence last week in a series of interviews.
Ms Dalelv says she was on a night out with colleagues on 6 March when the rape took place.
She reported it to the police, who proceeded to confiscate her passport and seize her money. She was charged four days later on three counts, including having sex outside marriage.
Her alleged attacker, she said, received a 13-month sentence for extramarital sex and alcohol consumption.
The man she accused of raping her - a colleague - has also been pardoned, a Norwegian official has said.
Despite developing fast as a cosmopolitan tourism destination in recent years, Dubai remains deeply conservative, and its strict laws have caught out foreigners in the past.
Public displays of affection and drunkenness are frowned upon.