The United States and Israel have made it official: The two countries signed a new 10-year military-assistance deal on Wednesday, representing the single largest pledge of its kind in American history. The pact, laid out in a Memorandum of Understanding, will be worth $38 billion over the course of a decade, an increase of roughly 27 percent on the money pledged in the last agreement, which was signed in 2007. The diplomatic and military alliance between the two countries is longstanding: Even prior to this week, Israel was, according to the Congressional Research Service, “the largest cumulative recipient of U.S. foreign assistance since World War II.” In many ways, Wednesday’s deal seemed predestined.

Yet, it’s also ironic. Barack Obama has a notoriously cold relationship with Israeli Prime Minister Benjamin Netanyahu—as my colleague Jeffrey Goldberg wrote in The Atlantic’s April cover story, “Obama has long believed that Netanyahu could bring about a two-state solution” to the Israel-Palestine conflict “that would protect Israel’s status as a Jewish-majority democracy, but is too fearful and politically paralyzed to do so.” Nonetheless, Obama will leave office having out-pledged all of his predecessors in military support to the country Netanyahu now runs.

Aid to Israel is among the only static issues of this U.S. election season. While the Republican presidential nominee Donald Trump has made somewhat mixed statements on the Israel-Palestine conflict, he has also made strongly worded promises to strengthen the relationship between the United States and Israel. For her part, the Democratic nominee, Hillary Clinton, has consistently touted her support for Israel, including during her time as secretary of state.

Voters, however, have more mixed views on this kind of support. While more than 60 percent of Americans were more sympathetic to Israel than the Palestinians in a 2016 Gallup poll, sympathies differed along partisan lines, with around half of Democrats being more sympathetic to Israelis versus nearly 80 percent of Republicans. In a separate Brookings poll, roughly half of Democrats who responded said Israel has too much influence on the United States government. Boycott, divest, and sanction movements, which call on organizations in the United States and abroad to cut their financial ties with Israel, have long been popular on college campuses, although somewhat marginal; this year, however, they got a boost from the Black Lives Matter movement, which included statements against Israel’s treatment of Palestinians in its recently released policy platform.

In general, young Americans are far less sympathetic toward Israel than their older peers: A 2014 Gallup poll found that only half of those aged 18 to 34 favored Israel in the Israel-Palestine conflict, “compared with 58 percent of 35- to 54-year-olds and 74 percent of those 55 and older.” Bernie Sanders, who was extremely popular among young people during the Democratic primary season, controversially criticized Israel, winning “applause and cheers” from the audience at one debate for saying, “If we pursue justice and peace, we are going to have to say that Netanyahu is not right all of the time.”

All of this creates an odd backdrop for a historic military-spending deal. No matter how bad the relationship between the two countries’ top leaders, no matter who gets elected to the White House, no matter how loudly some voters voice their opposition or how charged the underlying ideological debate: The United States has pragmatic reasons to keep providing large sums of money for Israel’s military.

There are straightforward explanations for why this particular deal got done. Politically, the spending package was partly a response to the nuclear deal that the United States and other world powers finalized with Iran in July of last year, and which Obama hailed as cutting off Iran’s pathway to nuclear weapons for more than a decade. Netanyahu was harshly critical of that agreement, which he called a “historic mistake” that would ease sanctions on Iran while leaving it with the ability to one day get the bomb. “Even with the deal in place, and taking the nuclear-weapon capability of Iran off the table at least for the next 10 to 15 years, there are still considerable destabilizing activities that Iranians are pursuing in the region that are not consistent with U.S. or Israeli interests or objectives,” said Melissa Dalton, a senior fellow at the Center for Strategic and International Studies. The new money is an attempt to pacify Israeli concerns about continued threats from Iran, she added.

The money is also an attempt to satisfy congressional Republicans. The Obama administration reportedly asked Netanyahu to get Lindsey Graham, the head of the Senate foreign-affairs appropriations committee, to agree to the deal. After it was signed, though, Graham released a statement indicating that Congress would not necessarily adhere to the pre-determined funding levels. “I find it odd the [Memorandum] only allocates $500 million for missile defense starting in 2018,” he wrote, especially “given provocative Iranian behavior [and] improved Iranian missile technology.” While this may be the U.S.’s biggest-ever military-aid deal, the GOP has pushed for even greater spending.

It is a foreign-policy deal seemingly immune to the electoral politics around it.

Defenders of the deal would say it’s necessary. Dalton described the uptick in spending as a natural extension of the long-standing relationship between the United States and Israel, “as well as close ties between those countries and their peoples.” She described the “fraught neighborhood” surrounding Israel: war-torn Syria to the northeast, Hezbollah-influenced Lebanon to the north, and an Islamist insurgency in Egypt’s Sinai to the south, all of which help explain the historically high promise of $5 billion in missile funding over the next 10 years. As National Security Advisor Susan Rice said at the signing ceremony for the deal, “This MOU is not just good for Israel, it’s good for the United States. Our security is linked. When allies and partners like Israel are more secure, the United States is more secure.”

The deal also directs more money back toward the United States. It eliminates a provision in the previous aid agreement that allowed Israel to spend 26 percent of its Foreign Military Financing on weaponry and other resources produced within Israel, rather than in the United States—a provision intended to help Israel build its own defense industry. Now that Israel’s defense industry has developed, Dalton said, that money will go toward purchases benefitting the defense industry in the United States.

While the United States’s new Memorandum of Understanding with Israel is historic in its own right, it’s most remarkable in its apparent inevitability: It is a foreign-policy move seemingly immune to the electoral politics around it. “At the end of the day, we’re electing people to make judgments based on the information and the advice that the receive,” Dalton said. “One of the inputs to that process, certainly, is popular opinion. But I don’t think it should be the sole determinant of foreign policy.” In its own way, that’s a good explanation of why America’s aid to Israel is so big: Military spending does not go up or down in direct relationship to votes or even the news cycle. In this case, it was a record set as if it were on an unstoppable trend line.