WASHINGTON — The United States will stop providing $4 billion in aid each year to Israel in 2027 but will sell arms to its closest ally in the Middle East, President Donald Trump said on Tuesday.

The Republican president told Fox News Channel during a phone call on Election Day for the midterms that Israeli Prime Minister Benjamin Netanyahu had approached him about the idea and that they have been talking about it for a couple of years.

Trump said Israel doesn’t need the aid and it’s a lot of money for the U.S. to spend. But Trump also said that U.S. aid to Israel has become a Democratic talking point for candidates such as Michigan U.S. Senate candidate Abdul El-Sayed, a vocal critic of Israel.

Even far-right conservatives, who have supported Trump in the past, have taken issue with U.S. support for Israel, with prominent commentators like Tucker Carlson openly questioning the value of the relationship.

“You can consider it barter. You can consider military aid or cash,” Trump said. “Look, we give them $4 billion of things and money, and they don’t need it. And I was approached by Bibi Netanyahu, and we’ve been talking about it for a couple of years because it’s a lot of money.”

But if Trump intended the announcement to make a last-ditch effort to sway midterm votes, analysts said it likely would not work.

“It’s an open question if this was about politics, but it isn’t going to change Republican voters, and it certainly isn’t going to change Democratic voters,” said David Schenker, who served as Trump’s top diplomat for the Middle East in his first term and is now with the Washington Institute for Near East Policy.

Israeli opposition leaders want to hear from Netanyahu

There was no comment from Netanyahu or his office as of Tuesday evening Israel time, several hours after Trump’s announcement. The prime minister did post twice on social media, but he focused on unsubstantiated allegations of foreign interference in Israel’s elections, not on what Trump said.

But at least some of his political opponents were critical.

His chief rival, Gadi Eisenkot, called on the prime minister to speak to the possibly radical change in U.S.-Israeli relations.

“The fact that Israel’s defense establishment is learning of a shift in our strategic relationship through the media, at the same time as the Israeli public, shows just how dangerous Benjamin Netanyahu’s conduct is,” Eisenkot, a former military chief, said in a statement.

Yair Golan, a leader in Israel’s opposition bloc, said an end to U.S. military aid would deal a “severe blow to Israel’s security” at a time when the country is fighting wars on multiple fronts.

“The burden of funding defense needs at such a critical juncture will fall entirely upon the Israeli public,” Golan, a former deputy military chief, said in a statement.

The United States has sent tens of billions of dollars in military aid to Israel over decades.

In 2016, President Barack Obama, a Democrat, signed an unprecedented security agreement with Israel to give its military $38 billion over 10 years, amounting to $3.8 billion a year. Under the agreement, Israel’s ability to spend part of the funds on Israeli military products was to be phased out and eventually all of the money would be spent on American military industries.