Turkey and Israel ended years of estrangement, motivated as much by the prospect of energy ties as a desire to repair diplomatic relations that broke down after a deadly clash at sea between Israeli commandos and pro-Palestinian Turkish activists. The deal, confirmed by Israeli Prime Minister Benjamin Netanyahu on Monday during his visit to Rome, paves the way for multi-billion dollar natural gas contracts as Israel seeks to export fuel from its largest field and Turkey looks to reduce its reliance on Russian natural gas. Restoration of ties also gives both countries wider regional support as they face international criticism over controversial domestic policies. This deal has “immense implications for the Israeli economy,” Netanyahu said at a press briefing in Rome with U.S. Secretary of State John Kerry, with whom he is meeting in Rome to discuss stalled Israeli-Palestinian peace efforts. Turkish Prime Minister Binali Yildirim, in a televised speech from Ankara, said “normalizing regional ties are to the benefit of both the Turkish and Israeli people” and that ambassadors will be reappointed. Energy stocks in Israel and Turkey climbed. Turkey’s Zorlu Enerji jumped 11.1 percent at 1:30 p.m. local time. Israel’s Delek Drilling rose 1.7 percent, Avner Oil Exploration Ltd. was up 2.1 percent and Ratio Oil Exploration 1992 LP advanced 1.6 percent. Energy Vulnerability Years of on-again, off-again rapprochement talks received new impetus after the Turkish military downed a Russian combat plane in November, provoking Russian economic sanctions that highlighted Turkey’s vulnerability to Moscow’s energy policies. In successive announcements in Ankara and Rome, Yildirim and Netanyahu outlined details of the accord, which is to be signed on Tuesday. Israel will pay Turkey $20 million to compensate for the deaths of 10 citizens killed in Israel’s 2010 raid on the Mavi Marmara, a Turkish ship that tried to breach the Israeli blockade of the Hamas-ruled Gaza Strip. Turkey will be allowed to transfer materials through Israel to build houses, a hospital, a power station and a desalination facility in Gaza. A first shipment of more than 10 tons of aid will be dispatched on Friday, Yildirim said. Turkey will also be able to build major projects in the West Bank, including an industrial zone in the West Bank city of Jenin, he said. The Turkish government abandoned its longstanding demand that Israel lift the naval embargo, which it says is meant to block arms shipments. Hamas didn’t approve the accord and “reaffirms its rejection of normalizing ties with the occupation,” a movement leader, Osama Hamdan, wrote on his Facebook page. The compensation money, which Israel agreed to pay without accepting responsibility for their deaths, won’t be paid until Turkey passes legislation indemnifying Israeli soldiers and officials against prosecution for the raid, Netanyahu said. As part of the agreement, Turkish President Recep Tayyip Erdogan will pledge in a letter to help return remains of two Israeli soldiers killed in the 2014 Gaza war, as well as two Israeli civilians, all being held in the Palestinian enclave, Netanyahu said. The countries are ending their feud amid diplomatic setbacks and tensions in the turbulent Middle East. Russia’s military intervention on behalf of Syrian President Bashar al-Assad, whom Erdogan had sought to remove, led to frictions between Moscow and Ankara even before the warplane incident. Erdogan is also at odds with the U.S. over its support for Syrian Kurds and the perception that he has grown increasingly authoritarian also has drawn international criticism. Deepening Isolation Israel’s international isolation is deepening over its half-century occupation of territory the Palestinians claim for a state. “Israel realized Turkey is perhaps the most reasonable customer for its gas exports because it needs the gas and is relatively strong financially,” according to Alon Liel, a former director-general of Israel’s Foreign Ministry and onetime head of mission to Turkey. “With the rise of Islamism and the decline of democracy in Turkey, Erdogan became a very unpopular figure in the region and controversial with the rest of the world,” Liel said. “And Netanyahu is accused of undermining the two state-solution. Here, as partial pariah-states, they kind of fall into each other’s arms.” Turkey was once Israel’s closest Muslim ally, their partnership based on strong military and economic ties. Relations began to fray after Erdogan took power in Turkey in 2003 at the head of an Islamic-oriented government and drew nearer to Iran and Hamas, which oppose the existence of a Jewish state. The Turkish leader’s heated criticism of Israeli policy toward the Palestinians, especially the Gaza incursion of 2008, created serious tension. Erdogan stomped off a stage he shared with Israel’s then-President Shimon Peres at the World Economic Forum in Davos. Turkey’s confrontation with Russia turned the tide. While diplomats negotiated, Turkish and Israeli gas companies have accelerated discussions in recent months as talks between the countries intensified, according to two people familiar with the matter. Trade Strong Israel’s flourishing military trade with Turkey dried up during the estrangement and its tourism to Turkish resorts fell more than 80 percent since 2009, according to the Israeli Embassy in Ankara. Still, other business channels remained open and bilateral trade reached a record $4.4 billion in 2011, according to official Turkish figures, staying near that level last year. The mending of the rift is proceeding in tandem with negotiations to reunify the Mediterranean island of Cyprus, whose north has been occupied by the Turkish military since 1974. A solution to that conflict would allow Turkey to buy gas from Cyprus as well as Israel, bringing it closer to its long-held dream of becoming an energy hub between East and West.