Israel and Turkey on Monday announced a reconciliation deal to end a bitter six-year rift between the Mideast powers.

In Rome, Israeli Prime Minister Benjamin Netanyahu said the deal would help bring "stability" to the turbulent Middle East. His Turkish counterpart, Binali Yildirim, made a simultaneous announcement in Ankara.

Relations between the once-close allies imploded six years ago after an Israeli naval raid killed nine Turks, including a dual American citizen, on board an aid ship trying to breach Israel's blockade of the Hamas-controlled Gaza Strip.

After the raid, the countries withdrew their ambassadors, largely cut security ties and have since maintained only low-level diplomatic relations.

Under Monday's deal, Israel and Turkey will restore full diplomatic relations, with ambassadors expected to return within several weeks.

Israel will pay $20 million in compensation for the families of people harmed in the naval raid, and it will allow Turkey to deliver aid to Gaza through an Israeli port and to carry out a series of development projects in Gaza, particularly in water and electricity.

Netanyahu said it is a "clear" Israeli interest to help resolve Gaza's water and electricity woes.

In return, Turkey agreed to prevent legal claims against Israel over the raid, and to prevent any military action or fundraising in Turkey, Netanyahu said, in an apparent reference to Hamas. Turkey remains close ties with Hamas, an Islamic militant group that is sworn to Israel's destruction and is labeled a terrorist organization by Israel and the West.

Even in their announcements, the two countries appeared to be at odds.

Yildirim said the deal, which will allow Turkey to deliver aid to Gaza and engage in infrastructure investments to construct residential buildings and a hospital and to address energy and water shortages in Gaza amounted to a partial lifting of the Gaza blockade.

"The total embargo imposed on Palestine and on the Gaza region in particular, is to being lifted to a great extent through Turkey's leadership," Yildirim said.

He said a first Turkish ship, carrying more than 10,000 tons of aid, would depart for the Israeli port of Ashdod on Friday.

"With this deal, the process of returning ties to normal has begun," Yildirim said.

Netanyahu, meanwhile, said the blockade remains in place. He called the blockade a "top security interest."

The Israeli leader spoke in Rome, where he earlier in the day held talks with U.S. Secretary of State John Kerry. The U.S. top diplomat welcomed the agreement and congratulated Netanyahu. He said the U.S. has been working on the rapprochement for several years, and called it a "positive step."

Netanyahu also said the deal would give a big boost to the Israeli economy by opening the key Turkish market to Israeli natural gas exports and by providing a gateway to the European market as well.

Israel imposed the blockade after Hamas seized control of Gaza in 2007. Israel says the measures are needed to prevent Hamas from importing weapons. The sides have fought three wars since the Hamas takeover.

Critics of the blockade say the measure amounts to collective punishment. Gaza's economy has largely come to a standstill as a result of the blockade, which greatly limits the flow of people and goods in and out of the territory. Egypt, which has cool relations with Hamas, has also kept its border with Gaza closed, compounding Gaza's woes.