Israel and Turkey have agreed to restore full diplomatic relations after Prime Minister Benjamin Netanyahu apologised for a deadly naval raid against a Gaza-bound international flotilla in a turnaround partly brokered by the US President.
Netanyahu said on Friday he "expressed apology" to Turkey for any error that led to the death of nine Turkish nationals in the 2010 incident. Israel also agreed to compensate the families of the victims, he said.
It was a surprising turnaround for Netanyahu who had long rejected calls to apologise. He announced the breakthrough after a 20-minute phone conversation with his Turkish counterpart, Recep Tayyip Erdogan.
US President Barack Obama helped broker the fence-mending while visiting Israel, but the sides had been reaching out to each other before.
"They agreed to restore normalisation between Israel and Turkey, including the dispatch of ambassadors and the cancellation of legal steps against Israeli soldiers,'' a statement from Netanyahu's office said.
Netanyahu "regretted the recent deterioration of relations between Israel and Turkey and expressed his commitment to overcoming their differences in order to advance peace and stability in the region," it said.
"In light of Israel's investigation into the incident which pointed to a number of operational mistakes, the Prime Minister expressed Israel's apology to the Turkish people for any mistakes that might have led to the loss of life or injury and agreed to conclude an agreement on compensation/nonliability."
During the phone call, Erdogan underlined the importance of strong cooperation and friendship between Turkey and Israel.
"Erdogan told [Israeli premier] Binyamin Netanyahu that he valued centuries-long strong friendship and cooperation between the Turkish and Israeli nations," Erdogan's office said.
It said Netanyahu appreciated Erdogan's interview with a Danish paper in which he said he was misunderstood in remarks at a UN conference in Vienna.
Erdogan said Islamophobia should be considered a crime against humanity "just like Zionism, like anti-Semitism and like fascism." His comments drew wide condemnation. Erdogan later told Politiken that he was misunderstood and was criticizing Israeli policy.
Erdogan's office said: "Our prime minister accepted the apology in the name of the Turkish people."
Erdogan "expressed that it was saddening that relations, which are of vital strategic importance for peace and the stability of the region, have been soured in recent years," the statement said.
Al Jazeera's Elif Ural, reporting from Istanbul, said that Hamas, armed Palestinian group, has sent a message expressing disappointment that Turkey has accepted the apology.
Israel and Turkey were once close allies. Relations began to decline after Erdogan, whose party has roots in Turkey's Islamist movement, became prime minister in 2003.
Tensions raged after Erdogan attacked Israel for the high Palestinian death toll in an Israeli campaign aimed at stopping daily rocket fire from Gaza on Israel in the winter of 2008, at one point storming off a stage he shared with the Israeli president at the high-profile World Economic Forum in Davos, Switzerland.
Animosity peaked on May 31, 2010, when Israeli commandos boarded a flotilla of six humanitarian ships on their way to Gaza.
Nine Turkish activists were killed on the lead ship Mavi Marmara, sparking international condemnation and contentious diplomatic dispute between Israel and Turkey.
An inquiry into the incident said Israel broke international humanitarian and human rights law.
The inquiry, which was later endorsed by the United Nations Human Rights Council, found "clear evidence to support prosecutions" for crimes including "wilful killing; torture or inhuman treatment; wilfully causing great suffering or serious injury to body or health."
Al Jazeera's Anita McNaught, reporting from Cairo, said Turkey got "almost everything it wanted" from the apology, including acknowledgement of Israel's "operational errors" and offer of compensation.
"This is an extraordinary event and a completely unexpected one," our correspondent said. "This has been enormously damaging schism between these two countries [Israel and Turkey]".
Israel has imposed a blockade on the Gaza Strip since June 2007 after Hamas took control of the territory.
Though the Israeli restrictions have been eased, Israel still enforces a naval blockade on the territory.
The lifting of the blockade, which Turkey has also demanded from Israel, is not covered in the apology, according to Al Jazeera's McNaught.