Israeli Prime Minister Benjamin Netanyahu and Turkish President Recep Tayyip Erdogan.
Jerusalem CNN  — 

Israel and Turkey have reached a deal to normalize diplomatic relations, six years after an Israeli raid on a Gaza-bound flotilla left eight Turks and an American citizen of Turkish origin dead.

Israeli Prime Minister Benjamin Netanyahu and Turkish Prime Minister Binali Yildirim announced Monday that the deal, set to be signed Tuesday, includes a $20 million compensation fund for Turkish families, an eventual return of ambassadors and initial talks on a possible natural gas pipeline.

Under the deal, Turkey will end all criminal or civil claims against Israeli military personnel and the State of Israel following the 2010 Israeli raid on a Gaza-bound Turkish aid flotilla that left nine people dead, Netanyahu said at a press conference in Rome where officials hammered out the agreement.

The blockade on the Gaza Strip remains in place but Turkey will be able to deliver humanitarian supplies through the Ashdod port in Israel, Netanyahu said.

A Turkish ship carrying 10,000 tons of aid will move towards Ashdod on Friday, Yildirim said.

Turkey’s Gaza plans

Turkey will also build a water treatment facility, a 200-bed hospital and a power plant in Gaza.

Turkish and Israeli officials reached the agreement after a year working on it in Rome. Both sides had been cautiously optimistic about reaching an agreement, but serious sticking points remained between the two countries, which have suffered years of strained relations.

Turkey had demanded that Israel lift its blockade of Gaza before normalizing relations, while Israel demanded that Turkey prevent Hamas leaders from operating within the country.

Hamas is a militant fundamentalist Islamic organization operating in the West Bank and Gaza.

Under the agreement, Turkey will deliver humanitarian aid and nonmilitary supplies to Gaza while making infrastructure investments, according to a senior Turkish official, who said Hamas was not mentioned in the agreement.

A rocky recent relationship

Relations between the two countries soured in May 2010 when Israeli commandos raided the Mavi Marmara, a ship bound for Gaza.

Turkey had long been Israel’s closest ally in the region, but the raid marked the end of normal diplomatic relations, as both countries pulled their ambassadors in the wake of the incident.

Prime Minister Benjamin Netanyahu apologized for the raid in March 2013, acknowledging “operational mistakes.” At the time, many analysts predicted a thaw in relations, but that didn’t materialize until now.

The reconciliation is as much driven by economics as politics. When the negotiations were made public in December, part of the discussions included a proposed natural gas pipeline from Israel to Turkey and the sale of natural gas.

Israel has vast untapped offshore natural gas fields that Prime Minister Benjamin Netanyahu wants to develop, while Turkey finds itself in need of a natural gas supplier after relations with Russia - its primary supplier - soured late last year.

President Barack Obama and Secretary of State John Kerry encouraged the reconciliation and worked to bring the two countries together, since both are key American allies in the region.

Vice President Joe Biden spoke with Netanyahu on the phone Sunday night, where he “congratulated the Prime Minister for progress toward reconciliation with Turkey, noting the significant positive security and economic benefits for both countries.”

CNN’s Oren Liebermann reported from Jerusalem and Gul Tuysuz reported from Turkey for this story.