JERUSALEM (Reuters) - Israel has released a Turkish woman who had been arrested while visiting on a tourist visa and accused of helping the Palestinian militant group Hamas, in a case that angered Ankara, Israel and her lawyer said on Monday.

FILE PHOTO: Turkish citizen, Ebru Ozkan, who was arrested at an Israeli airport last month, being brought to an Israeli military court near Migdal, Israel July 8, 2018 REUTERS/Nir Elias

Turkey threatened retaliation after Ebru Ozkan’s detention last month. The ex-allies have long been at loggerheads over Israeli policy toward the Palestinians and Jerusalem’s status.

Ozkan’s lawyer, Omar Khamaisi, said she flew to Istanbul on Sunday, a week after an Israeli military court indicted her. An appeals court had ordered her freed and returned her passport, he told Reuters, adding: “The indictment still stands, but I think that will be canceled too.”

The Turkish news agency Anadlou quoted Ozkan, upon landing, as thanking President Tayyip Erdogan for having been “kind enough to be very interested in my case”.

Commenting on the decision to release Ozkan, an Israeli official, speaking on condition of anonymity, said: “There are a number of factors behind this decision, including the amount of time she had already spent in detention and the fact that the charges weren’t especially grave in the first place.”

The official declined to be drawn on whether Turkish diplomatic pressure might also have been a factor.

Ozkan was held at Tel Aviv’s Ben Gurion Airport last month while trying to board her original flight home after a visit that took her to Jerusalem, whose Al Aqsa Mosque draws pilgrims from the few Muslim countries that have relations with Israel.

She was charged with helping smuggling money and packages to Hamas, which is classed as a terrorist group in Israel and the West, but not by NATO-power Turkey. Ozkan’s lawyer dismissed the charges as baseless and, potentially, politically motivated.

Hamas did not comment on the case.

Turkey’s Islamist-rooted government had cited Israel’s treatment of Ozkan and several other detained Turkish visitors as among “inhumane policies” that were souring bilateral ties.

Turkey vocally opposed a U.S. decision in December to recognize Jerusalem as Israel’s capital. Palestinians want a state with a capital in eastern parts of the city where Al Aqsa, as well as major Jewish and Christian shrines, are housed.