ANKARA/JERUSALEM (Reuters) - Israel and Turkey announced on Monday they would normalize ties after a six-year rupture, a rare rapprochement in the divided Middle East driven by the prospect of lucrative Mediterranean gas deals as well as mutual fears over growing security risks.

Israeli Prime Minister Benjamin Netanyahu looks on during a meeting with his Italian counterpart Matteo Renzi at Chigi Palace in Rome, Italy June 27, 2016. REUTERS/Tony Gentile

Turkish Prime Minister Binali Yildirim said the two countries would exchange ambassadors as soon as possible.

The mending in relations between the once-firm allies after years of negotiations raises the prospect of eventual cooperation to exploit natural gas reserves worth hundreds of billions of dollars under the eastern Mediterranean, officials have said.

Israeli Prime Minister Benjamin Netanyahu said it opened the way for possible Israeli gas supplies to Europe via Turkey.

The move also comes as the Middle East is polarized by Syria’s civil war and as the rise of Islamic State threatens regional security, leaving both countries in need of new alliances.

Relations between Israel and what was once its only Muslim ally crumbled after Israeli marines stormed an aid ship in May 2010 to enforce a naval blockade of the Hamas-run Gaza Strip and killed 10 Turkish activists on board.

Speaking after meeting U.S. Secretary of State John Kerry in Rome, Netanyahu said the agreement was an important step. “It has also immense implications for the Israeli economy, and I use that word advisedly,” he told reporters.

Kerry welcomed the deal, saying, “We are obviously pleased in the administration. This is a step we wanted to see happen.”

Turkey expelled Israel’s ambassador and froze military cooperation after a 2011 U.N. report into the Israeli raid on the Mavi Marmara largely exonerated the Jewish state. Israel and NATO member Turkey, which both border Syria, reduced intelligence sharing and canceled joint military exercises.

Netanyahu made clear the naval blockade of Gaza, which Ankara had wanted lifted under the deal, would remain in force, although humanitarian aid could continue to be transferred to Gaza via Israeli ports.

“This is a supreme security interest of ours. I was not willing to compromise on it. This interest is essential to prevent the force-buildup by Hamas and it remains as has been and is,” Netanyahu said.

But Yildirim said the “wholesale” blockade of Gaza was largely lifted under the deal, enabling Turkey to deliver humanitarian aid and other non-military products.

A first shipment of 10,000 tonnes would be sent next Friday, he said, and work would begin immediately to tackle Gaza’s water and power supply crisis.

“Our Palestinian brothers in Gaza have suffered a lot and we have made it possible for them to take a breath with this agreement,” Yildirim told a news conference in Ankara.

Turkish President Tayyip Erdogan spoke with Palestinian President Mahmoud Abbas by phone on Sunday night and told him the deal would improve the humanitarian situation in Gaza, sources in his office said. They said Western-backed Abbas, who lost control of Gaza to Hamas in fighting in 2007, had expressed satisfaction.

ENERGY TIES

Restoring relations with Ankara is a linchpin in Israel’s strategy to unlock its natural gas wealth. It is looking for export markets and is exploring a pipeline to Turkey as one option, both for consumers there and as a connection to Europe.

Slideshow ( 2 images )

“This is a strategic matter for the state of Israel. This matter could not have been advanced without this agreement, and now we will take action to advance it,” Netanyahu said.

Gas, he said, had the potential to strengthen Israel’s coffers “with a huge fortune”.

Shares in Turkey's Zorlu Energy ZOREN.IS, which has activities in Israel, rose 11 percent on news of the agreement. Israeli energy stocks also rose in Tel Aviv.

Yildirim was more cautious.

“Firstly let normalization begin and, after that, the level to which we cooperate on whatever subject will be tied to the efforts of the two countries,” he said. “There is no point in talking about these details now.”

Israel, which had already offered its apologies for the 2010 raid on the Mavi Marmara activist ship - one of Ankara’s three conditions for a deal - agreed to pay out $20 million to the bereaved and injured. The deal requires Turkey pass legislation protecting Israeli soldiers against related lawsuits.

A senior Turkish official described the agreement as a “diplomatic victory”, even though Israel pledged to maintain the Gaza blockade it says is needed to curb arms smuggling by Hamas, an Islamist group that last fought a war with Israel in 2014.

“Israel comes out on top here,” said Louis Fishman, assistant professor of history at Brooklyn College in New York, who specializes in Turkish and Israeli affairs.

“From the start it believed that a deal could be worked out where Turkish aid was able to enter the Gaza Strip under Israeli supervision. It seems this is what was struck.”