You may have heard that Israeli politics is extremely complex. But one of the most important forces at play there is actually rather straightforward: When Israelis feel safe and strong they tend to support moderate parties. When they feel vulnerable they move to the right. Understand that, and you will understand Israel -- and why President Barack Obama may have inadvertently given Benjamin Netanyahu a helping hand.
Israelis know they need American support to survive in a hostile, increasingly unstable and radicalized neighborhood, but they don't believe they can trust Obama to help keep them safe. And the president, despite taking numerous measures to support the Jewish state, has done a dismal job of persuading Israelis that he has their back.
This reality helps explain how Netanyahu and his rightist Likud party pulled off an upset victory this week, despite opinion polls showing them trailing the main opposition Zionist Union heading into Tuesday's election.
Clearly, it's not all Obama's fault. Netanyahu's opponents also failed to address security issues, believing a focus on pocketbook matters would be enough. And Netanyahu is a skilled, articulate and shrewd politician.
But Obama, like it or not, was one of the reasons for Likud's success.
When Netanyahu traveled to Washington a couple of weeks ago to warn the U.S. Congress about an impending "bad deal" with Iran over its nuclear program, Obama refused to meet with him, claiming he didn't want to influence Israel's elections. Few believed this was the real reason -- it's no secret the two men don't particularly like one another.
Through much of his presidency, Obama has failed to convince Israelis thay they can trust him. And his handling of the recent spat with Netanyahu only added to the problem. By appearing to dismiss Netanyahu's warning of a "nuclear nightmare" over the Iran talks by arguing that the prime minister was offering no "viable alternatives," Obama missed an opportunity to reassure security conscious Israelis that the United States will safeguard their survival. His tacit acknowledgment that there might be no alternative to an imperfect deal was of little comfort to Israelis who have spent years hearing genocidal threats from the Iranian regime.
The fact that Obama has become one of the key reasons why Netanyahu continues to win elections in Israel is ironic considering Israelis are profoundly worried about the deteriorating ties with the United States, a relationship they consider key to ensuring their country's survival.
One recent poll showed only 37% of Israelis believe Obama has a "positive" position towards Israel, a mood that has undoubtedly helped Netanyahu enormously, despite the fact that large numbers of former security officials have said Netanyahu is endangering the country by undermining ties with Washington, and despite Israelis saying close relations with the United States are the second most important factor for Israel's security, behind only Israel's own military strength.
All this left a genuine opening for Obama to influence the Israeli electorate, because Israelis desperately want to trust the American president -- and they remain America's biggest, most loyal fans, according to a recent Pew poll.
Yet despite the positive sentiment in principle, Israeli voters -- especially on the right -- have been skeptical that Obama has their best interests at heart. This point was underscored in a recent poll that asked Israelis recently if they believed President Obama would agree to a deal that Israeli officials considered harmful to Israel's security. Of those that responded, 61% said yes, he would do so. However, 95% of Labor supporters said no, Obama would do no such thing, while 93% of Likud voters said they believed Obama would disregard Israel's security.
The worry over security extends beyond a nuclear deal with Iran to include the other key foreign policy issue -- the possibility of a Palestinian state.
A majority of Israelis still support the creation of two states, one for Israelis and another for Palestinians. And despite the last-minute statements from Netanyahu dismissing the idea, it is important to remember that polls have consistently shown Israelis continue to support the establishment of a Palestinian state, as long as Israel's security can be assured.
The trouble is that right now, many Israelis don't believe they can preserve their security with a Palestinian state just a few miles from their major cities, not least because previous territorial withdrawals -- from Gaza and from southern Lebanon -- have simply created launch pads for attacks against Israel. So when rightist leaders such as Netanyahu say Israelis will not be safe with a Palestinian state, voters are inclined to believe them.
All this suggests that if Obama wants to persuade the Israeli public to push its government towards compromise, he needs to rebuild the public's trust in him. Israelis want peace, but they also need to be reassured that their safety and survival is a paramount concern of their U.S. ally.
And if President Obama cannot assure them of this? Well, they will simply wait until there is a president they feel they can trust. It's not that complicated.
Frida Ghitis is a world affairs columnist for The Miami Herald and World Politics Review and a former CNN producer and correspondent. The opinions expressed in this commentary are hers.