LONDON — A British teenager who was found guilty of lying about being gang-raped while on vacation in Cyprus was given a suspended four-month sentence Tuesday — and is now free to return home to England.

The 19-year-old woman had accused a dozen young Israeli men of raping her in a hotel room in the popular resort town of Ayia Napa in July.

The woman, her identity shielded in both Cyprus and Britain, was put on trial after she recanted her claim. She was found guilty in Famagusta District Court last month of “public mischief” for making a false charge.

However, the British teen’s lawyer said Cypriot police pressured her to falsely confess to lying about the incident — a charge that police denied.

The tangled case has been splashed across the pages of British, Cypriot and Israeli newspapers for months.

When the young Israelis were released from Cyprus and returned home, they were greeted by family and friends, who popped champagne at the airport to chants, in Hebrew, of “The people of Israel live” and “The Brit is a whore.”

One of the teenager’s lawyers also charged that the Israelis posted video on social media of themselves having sex with the woman as an act of “revenge porn.”

In Israel, where revenge porn is illegal, commentary on the case was mixed, with some saying the young men were unfairly tarred and others believing they had acted immorally.

The “public mischief” conviction was also a source of tension between Britain and Cyprus. Britain’s Foreign Office stated that it was “seriously concerned” over whether the young woman received a fair trial.

Through the British tabloids, before her sentencing, the woman made a direct appeal to Prime Minister Boris Johnson. “I am 19 and all I want to do is clear my name and come home to my family,” the Sun reported her saying. “Time is running out for me. Please, please help.”

Her cause was also adopted by human rights campaigners and #MeToo activists, from abroad and on the island, who complained that police bungled the case and treated a victim of alleged sexual assault with cruelty.

Outside the courtroom on Tuesday, the BBC reported that several dozen demonstrators from Israel, Britain and Cyprus chanted, “We believe you” and “No means no.”

The woman’s family said she would return to Britain immediately. Her lawyer, Lewis Power, told reporters he would appeal the conviction.

Outside court, the teenager’s mother told her daughter’s supporters, “I just want to thank each and every one of you for turning up today, having belief, having faith and making sure we get justice,” according to the BBC.

Judge Michalis Papathanasiou told the courtroom he was “troubled” by the case but was prepared to give the woman a “second chance” with a suspended sentence. The teen spent a month in jail before being released on bail. She was ordered to pay $150 in legal fees.

“All the evidence shows that she had lied and prevented the police from doing other serious jobs,” the judge said, according to media reports from the court.

“Twelve people were arrested, and seven of them were there for at least 10 days. That was also a serious offense,” he said.

Citing “her psychological state, her youth, that she has been away from her family, her friends and academic studies this year,” Papathanasiou added that “this has led me to decide to give her a second chance and suspend the sentence for three years.”