(Bloomberg) -- The US and Saudi Arabia are nearing a historic pact that would offer the kingdom security guarantees and lay out a possible pathway to diplomatic ties with Israel, if its government brings the war in Gaza to an end, people familiar with the matter said.

The agreement faces plenty of obstacles but would amount to a new version of a framework that was scuttled when Hamas militants attacked Israel on Oct. 7, triggering the conflict in Gaza. Negotiations between Washington and Riyadh have sped up recently, and many officials are optimistic that they could reach a deal within weeks, according to the people, who asked not to be identified discussing private deliberations.

Such an agreement would potentially reshape the Middle East. Beyond bolstering Israel and Saudi Arabia’s security, it would strengthen the US’s position in the region at the expense of Iran and even China.

The pact may offer Saudi Arabia an arrangement strong enough to need US Senate approval and even give the world’s biggest oil exporter access to advanced US weapons that were previously off-limits. Crown Prince Mohammed bin Salman would agree to limit Chinese technology from his nation’s most sensitive networks in exchange for major US investments in artificial intelligence and quantum-computing, and get American help to build out its civilian nuclear program.

Once the US and Saudi Arabia settle their agreement, they would present Israeli Prime Minister Benjamin Netanyahu with a choice: either join the deal, which would entail formal diplomatic ties with Saudi Arabia for the first time, more investment and regional integration, or be left behind. The key conditions for Netanyahu would be no small feat — ending the Gaza war and agreeing to a pathway for Palestinian statehood.

The proposal is fraught with doubt and may not come to fruition, which people familiar with the planning readily acknowledge.

The latest conversations amount to a shift in approach for Biden and Prince Mohammed. As originally conceived, the agreement would have been a three-way deal that forged Saudi-Israeli diplomatic relations along with greater investment and integration in the region. 

Now, the US and Saudi Arabia see a deal with each other as central to ending the war between Israel and Hamas, which has ramped up tension in the wider Middle East and led to huge protests in the West. At home, Saudi Arabia has stepped up the arrest of citizens for social-media posts related to the war.

Read more: Saudi Arabia Steps Up Arrests Of Those Attacking Israel Online

The US and Saudi Arabia would offer Israel a series of economic, security and diplomatic incentives if it scales back plans for an invasion of Rafah, the southern Gaza city where more than 1 million Palestinians have taken refuge, and quickly concludes its war with Hamas.

For Netanyahu, another advantage is that a pact would help counter Iran’s aggression. Since the war in Gaza erupted, Israel and Iran have exchanged their first-ever direct fire and Tehran’s proxy militias such as Hezbollah have regularly attacked the Jewish state.

Hurdles and Incentives 

Persuading American lawmakers to approve a deal that commits the US to protecting Saudi Arabia militarily would be a daunting prospect for the White House, especially if Israel opts not to join. Many lawmakers remain wary of Prince Mohammed, the kingdom’s 38-year-old de facto ruler, after the killing of Washington Post columnist Jamal Khashoggi by Saudi agents in 2018. They’re also uneasy about the Saudi strategy of lowering oil production, along with other members of the OPEC+ cartel, to prop up prices.

From the Israeli side, Netanyahu leads the most right-wing government in the country’s history and has all but ruled out a two-state solution. His coalition says it still plans to attack Rafah, which the US and Arab states fear would lead to thousands more deaths among Palestinian civilians. Such an attack would also jeopardize prospects for a short-term cease-fire that US Secretary of State Antony Blinken — who met Netanyahu in Jerusalem on Wednesday — says is a priority for President Joe Biden.

Still, the leaders of the three countries have plenty of incentives to reach an agreement soon. For Biden, it’s a chance for a foreign-policy victory before the US presidential election in November. The crown prince would avoid the uncertainty about whether former President Donald Trump would accept a deal if he wins that race, even though Trump’s administration initiated the Abraham Accords that envisioned such alliances between Israel and its neighbors.

Netanyahu, the biggest wild card, could take credit for normalizing relations with the biggest economy in the Middle East and guardian of Islam’s holiest sites — a goal he’s long coveted.

US officials said talks are underway but declined to comment on specifics. Saudi Arabia’s government didn’t immediately respond to a request for comment. Netanyahu’s office declined to comment. Earlier Wednesday, the Guardian reported the US and Saudi Arabia had drafted a set of agreements linked to a broader Palestinian peace deal. 

“We have done intense work together over the last months,” Blinken said on Monday while in Saudi Arabia. “The work that Saudi Arabia and the United States have been doing together in terms of our own agreements, I think, is potentially very close to completion.”

At the same event, Saudi Foreign Minister Faisal bin Farhan said an agreement was “very, very close.”

Aspects of the deal would mirror agreements the US has made in recent months with other regional partners, including the United Arab Emirates. In that case, Abu Dhabi’s top artificial intelligence firm, G42, agreed to end cooperation with China in exchange for an investment from Microsoft Corp.

In the case of Saudi Arabia, which is also eager to develop artificial intelligence and semiconductors locally, the US has said it can’t do so with American help if it keeps Chinese technology. Saudi Arabia would need to agree not to pursue cooperation on advanced technology with US adversaries, a person familiar with the matter said.

And Saudi Arabia would get to fulfill its long-sought wish for a civilian nuclear program. In exchange, the US would gain access to the kingdom’s uranium, the person said. 

Israel may be running out of time for a deal. International support for Netanyahu’s position is waning the longer the war continues. US polling backs that up. Roughly a third of Republicans in seven swing states oppose continued aid to Israel, as do four in 10 Democrats and independent voters, according to a recent survey.

“This is a strategic act between Saudi Arabia and the United States that’s meant to secure and cement America’s position in the Middle East at a time when the kingdom, but also others, have been diversifying their foreign-policy options away from Washington,” said Firas Maksad, a senior fellow at the Middle East Institute. 

--With assistance from Courtney McBride, Donato Paolo Mancini, Henry Meyer, Mackenzie Hawkins and Iain Marlow.

(Updates with arrests in Saudi Arabia in 8th paragraph)

©2024 Bloomberg L.P.