WASHINGTON (Reuters) - The United States will give Israel $38 billion in military assistance over the next decade, the largest such aid package in U.S. history, under a landmark agreement signed on Wednesday.

The deal, whose details were reported by Reuters earlier, will allow Washington’s chief Middle East ally to upgrade most of its fighter aircraft, improve its ground forces’ mobility and strengthen its missile defense systems, a senior U.S. official said.

While the package constitutes the most U.S. military aid ever given to any country, it entails concessions by Israeli Prime Minister Benjamin Netanyahu, according to officials on both sides.

Those include Israel’s promise not to seek additional funds from Congress beyond what will be guaranteed annually in the new package, and to phase out a special arrangement that has allowed Israel to spend part of its U.S. aid on its own defense industry instead of on American-made weapons, the officials said.

Nearly 10 months of drawn-out aid negotiations underscored continuing friction between President Barack Obama and Netanyahu over last year’s U.S.-led nuclear deal with Israel’s arch-foe Iran, an accord the Israeli leader opposed. The United States and Israel have also been at odds over the Palestinians.

But the right-wing Netanyahu decided it would be best to forge a new arrangement with Obama, who leaves office in January, rather than hoping for better terms from the next U.S. administration, according to officials on both sides.

A new pact now allows him to avoid uncertainties surrounding the next president, whether Democrat Hillary Clinton or Republican Donald Trump, and to give Israel’s defense establishment the ability to plan ahead.

Obama’s aides wanted 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, and of taking too hard of a line with the Israeli leader.

“DANGEROUS NEIGHBORHOOD”

The $38 billion memorandum of understanding covers U.S. fiscal years 2019-2028 and succeeds the current $30 billion MOU signed in 2007, which expires at the end of fiscal 2018.

“Prime Minister Netanyahu and I are confident that the new MOU will make a significant contribution to Israel’s security in what remains a dangerous neighborhood,” Obama said in a written statement.

The agreement was signed at the State Department by U.S. Undersecretary of State Thomas Shannon and by Jacob Nagel, acting head of Netanyahu’s national security council.

According to a White House “fact sheet,” the deal includes:

U.S. President Barack Obama meets with Israeli Prime Minister Benjamin Netanyahu in the Oval office of the White House in Washington November 9, 2015. REUTERS/Kevin Lamarque

-annual payments of $3.3 billion in so-called foreign military financing

-$500 million a year for Israeli missile defense funding, the first time this has been formally built into the aid pact.

-A phasing-out of a special arrangement that for decades has allowed Israel to use 26.3 percent of the U.S. aid on its own defense industry instead of on American-made weapons.

-Elimination of a longstanding provision that has allowed Israel to use about 13 percent of the U.S. aid to buy military fuel.

-The funding will allow Israel to update “the lion’s share” of its fighter aircraft, including purchasing additional F-35 Joint Strike Fighters. Israel is scheduled to receive 33 F-35 aircraft, the first two of which will be delivered in December.