The British woman who faced up to two years in a Dubai prison for a disparaging Facebook post about her ex-husband’s new wife will be released, the group representing her said Thursday.

Laleh Shahravesh, 55, of London was arrested along with her teenage daughter at the airport in Dubai last month after visiting the United Arab Emirates for her ex-husband’s funeral.

The mother-of-one is expected to return home by next week after settling the case with an $820 fine, Detained in Dubai said in a statement.

BRITISH WOMAN FACES JAIL TIME IN DUBAI FOR ‘INSULTING’ POST ABOUT EX-HUSBAND’S NEW WIFE

Shahravesh and her ex-husband, Pedro, were married for 18 years and lived in Dubai for eight months while he worked for HSBC there. At some point, she and their 14-year-old daughter returned to London, with the understanding that he would join them at a later date after his work commitments ended.

Months later, however, the couple divorced and Pedro remained in Dubai.

Shahravesh apparently discovered her ex-husband was remarrying when she saw posts of the new couple on Facebook.

She posted two comments in Farsi, including one that said: “I hope you go under the ground you idiot. Damn you. You left me for this horse.”

The second comment said: “You married a horse you idiot.”

Shahravesh’s ex-husband’s widow, who is Tunisian and lives in Dubai, reported the comments to authorities.

Under UAE cybercrime laws, a person can be jailed or fined for making defamatory statements on social media.

CLICK HERE TO GET THE FOX NEWS APP

Detained in Dubai chief executive, Radha Stirling, said they are working to get Shahravesh back her passport so that she can travel back to London early next week. She described the fine her client had to pay as “symbolic,” adding that the UAE’s cyber laws were “a loaded gun pointed at the head of anyone using the internet.”

“Anyone exercising their freedom of speech, who lives in, visits, or indeed, who may ever step foot in the UAE is at risk,” she said. “Laws are supposed to protect people, protect their rights and freedoms; but the UAE’s Cybercrime laws do the opposite. Everyone traveling to or through the UAE is endangered by them and not everyone who falls victim to these laws is guaranteed media coverage.”