WASHINGTON, Aug 3 – The United States and Israel have closed many of the remaining gaps in negotiations over a new multibillion-dollar military aid package for Washington’s top Middle East ally, and the two sides hope to reach a deal soon, a senior U.S. official said on Wednesday.

Jacob Nagel, acting head of Israel’s national security council, wrapped up three days of closed-door discussions in Washington over a new 10-year defense pact, including a meeting with U.S. national security adviser Susan Rice.

Drawn-out aid negotiations have underscored continuing friction between U.S. President Barack Obama and Israeli Prime Minister Benjamin Netanyahu over last year’s U.S.-led nuclear deal with Iran, Israel’s arch-foe. The United States and Israel have also been at odds over the Palestinians.

However, with Obama due to leave office in January, both sides have appeared increasingly determined to come to an agreement to enshrine U.S. assistance to Israel over the next decade.

“We’ve made progress and closed many of the remaining gaps. We hope soon to be able to reach final agreement,” the senior official told Reuters after the talks concluded. However, the official declined to elaborate or provide a precise timetable for completing negotiations.

Raising hopes for removal of a key sticking point, Israel had signaled at the start of the talks that it might accept the Obama administration’s demand that U.S. military funds, until now spent partly on Israeli arms, will eventually be spent entirely on U.S.-made weapons, according to U.S. sources.

It would mark a major concession by Netanyahu.

The right-wing Israeli leader, who has had a fraught relationship with Obama, has decided it would be best to forge a new memorandum of understand (MOU) with him rather than hoping for better terms from the next U.S. president, according to officials on both sides.

The White House has pledged to sign a new MOU that would “constitute the largest single pledge of military assistance to any country in U.S. history.”

The current pact, signed in 2007 and due to expire in 2018, gave Israel around $30 billion in foreign military financing.

U.S. negotiators are believed to have stuck to a previous offer of $3.5 billion to $3.7 billion annually for Israel under the new MOU, substantially less than the $4 billion a year Netanyahu has sought but still a sizeable increase.

DIFFERENCES TO BE RESOLVED

A key disagreement has been over Washington’s insistence on ending a special arrangement that has allowed Israel to spend 26.3 percent of its U.S. defense aid on its own military industries rather than on American products.

Israeli officials argue that the provision, which is given to no other country receiving U.S. military assistance, was needed to maintain Israel’s “qualitative military edge” against hostile neighbors such as Iran, and that its removal would mean the loss of thousands of Israeli defense jobs.

But a congressional source briefed by the Obama administration said Israel had signaled its willingness to phase out the provision. The Israeli newspaper Yedioth Ahronoth said the White House was prepared to let Israel keep the arrangement for the first five years of the new MOU but it would be gradually phased out in the second five years, except for joint U.S.-Israeli military projects.

Another sticking point has been Washington’s desire to end a provision allowing Israel to spend around $400 million annually from the package on military fuels. The two sides have also haggled over U.S. funding for Israeli missile defense.

Obama’s aides want to secure a new deal before his presidency ends, seeing it as an important part of his legacy. Republican critics accuse him of not being attentive enough to Israel’s security, which the White House strongly denies.

Netanyahu angered the White House in February when he suggested the agreement could wait for the next president.

But officials on both sides say Netanyahu seeks a deal now to avoid uncertainties surrounding the next president, whether Democrat Hillary Clinton or Republican Donald Trump, and also to give Israel’s defense establishment the ability to plan ahead.