TEL AVIV — When President Donald Trump announced on Twitter this weekend that he had discussed a possible mutual defense treaty with Israeli Prime Minister Benjamin Netanyahu, it was widely seen as as an effort to bolster an embattled Israeli leader who faces an election Tuesday that could end his political career.

Yet compared to Trump’s pre-election gift to Netanyahu in the April election, when Trump recognized Israeli sovereignty in the Golan Heights, security experts say this supposed gift is not as beneficial to Israel as it may seem.

“The idea of this treaty has been evaluated many times in Israel in the past,” says Amos Yadlin, Israel’s former head of military intelligence who now leads the Institute for National Security Studies.

The idea was always rejected, he says, because the costs far outweigh the benefits. According to Yadlin, the primary benefit of this treaty, which the U.S. has with many allies, is what’s referred to as NATO Article 5. If a nation is attacked, the other partner nations will come to its assistance. That deterrence factor is highly valuable, he says, because any state or group that attacks Israel would understand that they are also going to war with America.

“Yet the bottom line has always been that even though it would be very helpful to Israel’s deterrence and security,” Yadlin said, "it’s something Israel could not agree to.” This treaty goes both ways, after all. And Israel, a country the size of New Jersey with a population of just 9 million people and currently facing attacks from archenemies in Gaza, Lebanon and Syria, would not be willing or able to come to America’s defense.

Another problem for Israel is that a mutual defense treaty would limit its military freedom, requiring American cooperation before it takes action. While Israel might have unimpeded approval from Trump, future American leaders may be less supportive of Israel’s decisions.

Yadlin recalls Israel’s 1981 attack on Iraq’s nuclear reactor. “If Israel had asked the Reagan administration for permission to do that, the answer would have been negative,” he said.

The third issue is Israel’s most closely guarded secret: its nuclear capabilities, which it would need to be transparent about if it were to enter a mutual defense treaty.

And finally, there’s another thorny issue: borders, which Israel would be asked to formally define as part of a defense pact. “I see no problem with this question,” Yadlin said. “But I’m not sure Netanyahu wants to answer that.”

Like Netanyahu’s announcement last week that he would annex parts of the West Bank if re-elected, many political analysts say this is no more than a last-ditch effort to get his base to the polls.

“It’s clearly an attempt to show how Netanyahu is friendly with Trump and how he is a super leader,” says Gideon Rahat, a political science professor at Jerusalem’s Hebrew University and director of the political reform program at the Israel Democracy Institute.

“He’s doing his best to show off how he is respected in the world, and he indeed has a lot of allies in the world among people who see eye to eye with him on how democracy should look, and also foreign policy.”

Much of Netanyahu’s campaign, both now and before the April election, has rested on his unique relationship with Trump, who is more popular in Israel than he is in the United States.

Giant campaign billboards perched over highways and cities declare “Netanyahu: Another League” with a photo of a smiling Trump and Netanyahu shaking hands. In response to Trump’s tweet on Saturday about the possibility of a mutual defense treaty, Netanyahu tweeted: “The Jewish State has never had a greater friend in the White House.”

Given the disadvantages Israel would face entering this kind of agreement, many say it’s unlikely to pan out. However, if this mutual defense treaty were to be customized to meet Israel’s unique needs, some say it could well be in Israel’s interest. For example, if the treaty was made to focus specifically on a threat from Iran, Yadlin said, “only then could it be considered positive.”

Such an agreement would be especially valuable to Israel now that John Bolton is no longer Trump’s national security adviser. For Netanyahu and many Israelis, the nuclear threat from Iran is Israel’s gravest concern. With Bolton out of the White House, many here fear that Trump’s stance on Iran will soften, potentially enabling the Islamic Republic to develop a nuclear weapon that it would almost surely use against Israel.

"The real pity in this is that we are talking about very serious stuff,” Rahat said. “This is not a matter for election propaganda.”

Regardless of whether Israel ever signs a mutual defense treaty, Netanyahu is already touting the mere discussion of it with Trump as a win. In an interview on Israel’s Channel 12 TV station just hours after Trump’s tweet made headlines Saturday, Netanyahu told voters, “I'm going to get us a defense pact that will provide us with security for centuries, but for that I need your votes.”