Israeli Prime Minister Benjamin Netanyahu apologised to Turkey on Friday for a deadly raid on a Gaza aid flotilla and announced a full resumption of diplomatic ties as well as compensation.

The breakthrough, which ends a nearly three-year diplomatic rift, was engineered by US President Barack Obama at the tail end of a historic three-day visit to the Holy Land, the first of his presidency.

Speaking soon after Air Force One departed for Amman, a senior US official said the Israeli leader had apologised to his Turkish counterpart Recep Tayyip Erdogan in a special telephone call from Ben Gurion airport near Tel Aviv.

"On behalf of Israelis he apologised for any deaths those operational mistakes might have caused," the official said.

"Prime Minister Erdogan accepted the apology on behalf of Turkey," he added, saying Obama had also spoken with the Turkish leader.

Israel and Turkey both confirmed the apology, with Netanyahu's office announcing a resumption of full diplomatic ties between the former close allies.

Erdogan's office said the premier had accepted the apology "in the name of the Turkish people" and had underlined the "vital and strategic" nature of the relations between the two countries.

"The two prime ministers agreed on concluding a compensation deal" for the victims' families and on "working together to improve the humanitarian situation in the Palestinian territories."

Ties between Israel and Turkey plummeted in May 2010, when Israeli commandos staged a botched pre-dawn raid on the six-ship flotilla to Gaza headed by the Mavi Marmara, in which nine Turkish nationals were killed.

The assault triggered an international outcry and a bitter diplomatic crisis between Turkey and Israel, with Ankara demanding a formal apology and compensation for the families of the victims.

Until now, Israel had refused, in part for fear that it could open the way for the prosecution of commandos who took part in the raid.

US State Department spokeswoman Victoria Nuland commented: "It has been of great concern to the United States for some time now that our two allies Israel and Turkey were not getting along well with each other.

"In virtually every meeting that every senior American has had with the Israeli side or the Turkish side, we have encouraged them to try to work this through."

A senior official in Netanyahu's office said the two leaders spoke and "agreed to normalisation between the countries including returning ambassadors, and cancelling legal proceedings against IDF (army) soldiers."

He was referring to the high-profile trial in absentia of four top Israeli military chiefs by an Istanbul court that opened in November.

The Israeli leader "made clear that the tragic outcome of the Mavi Marmara incident was not intended by Israel and that Israel regrets the loss of human life and injury," his office said in a statement.

"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."

The Islamist Hamas movement, which rules Gaza, said the apology "showed Israel's fear of the regional changes" under way since the Arab Spring of 2011 that have seen Islamists brought to power in Egypt and Tunisia.

"Netanyahu's apology was late, and he should immediately end the siege on Gaza," Hamas spokesman Taher al-Nunu told AFP.

A Hamas official said Erdogan phoned exiled Hamas chief Khaled Meshaal on Friday evening and briefed him on the details of Netanyahu's apology.

Former foreign minister Avigdor Lieberman, who for years opposed an Israeli apology, called Netanyahu's move a "grave mistake".

"Such an apology demoralises IDF soldiers," said Lieberman, who now heads the parliamentary foreign and defence committee.

But armed forces chief of staff Lieutenant General Benny Gantz welcomed the move, saying he hoped it would boost the countries' security and strategic ties.

Newly sworn-in Defence Minister Moshe Yaalon, who in the past was opposed to an official apology or direct compensation, on Friday supported the apology, his spokesman told AFP.