Image source, ReutersImage caption, Natali Oknin thanked "the entire nation of Israel" for helping to secure their release

An Israeli married couple detained by Turkey on spying charges for almost a week has been released and flown home.

Mordi and Natali Oknin, who are both bus drivers, said they were on holiday in Istanbul when they were arrested for taking photographs of the residence of Turkish President Recep Tayyip Erdogan.

Both the couple and Israel's government denied the charges.

Their arrest had dominated Israeli news headlines and threatened to become a damaging spat between the countries.

Israel's Prime Minister Naftali Bennett and Foreign Minister Yair Lapid issued a joint statement thanking Mr Erdogan and his government "for their co-operation".

Mr Bennett was also expected to speak by telephone with Mr Erdogan on Thursday for what would be the first conversation between an Israeli prime minister and Turkish president since 2013.

Image source, Getty ImagesImage caption, A lawyer for the Oknins said they had taken photos of the Ottoman-era Dolmabahce Palace from a ferry

"Thank you to the entire nation of Israel. Thank you to everyone who helped and supported and got us freed," Natali Oknin told reporters after she and her husband arrived at Tel Aviv's Ben Gurion airport on board a chartered private jet.

The couple were later greeted by a crowd of relatives and friends at their home in the city of Modiin.

Turkish media reported last Friday that the Oknins and a Turkish citizen were arrested after staff at a restaurant in the Camlica TV and Radio Tower, on the Asian side of Istanbul, told police that they had been taking pictures of Mr Erdogan's residence.

A judge at a court in the city later charged Mr and Mrs Oknin with "political and military espionage" and extended their detention for at least 20 days.

An Israeli lawyer for the couple rejected the allegations and said they had merely photographed the waterfront Dolmabahce Palace, on Istanbul's European side, during a boat trip. The palace has not been a presidential residence for decades, although parts of it are used as a working office.

Israeli President Isaac Herzog also said he was "convinced" of the Oknins' innocence and emphasised that they did "not work for an Israeli agency".

Israel's Haaretz newspaper cited a source as saying a court had granted the couple's appeal on Wednesday following intense efforts by Israeli officials to bring about their release.

Turkish officials have not commented on the developments, but Turkey's DHA news agency reported that the Turkish citizen arrested along with the Oknins had also been released.

You may also be interested in:

This video can not be played

To play this video you need to enable JavaScript in your browser.Media caption, Watch: Shahar Perets explains why she'd rather go to jail than join the Israeli army