US President Barack Obama and Benjamin Netanyahu will have to bury past hostilities if the Israeli prime minister is re-elected to jointly face looming threats such as Iran, analysts say.

The two men have never warmed to each other, and ties have remained frosty. Obama pointedly failed to make time to meet the Israeli leader on the sidelines of the UN General Assembly in September.

Netanyahu also made little secret of the fact that he was rooting for Obama's Republican rival, Mitt Romney, in November's US presidential election.

Yet another spat made public headlines this week when Netanyahu reacted angrily to comments attributed to Obama that "Israel doesn't know what its own best interests are."

"I think everyone knows that the citizens of Israel are the only ones who can decide who will faithfully represent the vital interests of the state," Netanyahu snapped back.

Analysts say, however, that such posturing is part of Netanyahu's campaign to portray himself domestically as a strong leader who can stand up for Israel, even against its closest ally the United States, ahead of Tuesday's elections.

But they also argue that, ironically, US-Israeli ties at an institutional level may never have been stronger.

"It's quite extraordinary that given the disparity of roles, obligations and world views, that there isn't more that divides the US and Israel," said Aaron David Miller, a vice president and distinguished scholar at the Wilson Center.

"The anomaly of the relationship is that while on the one hand you have the most dysfunctional relationship between an Israeli prime minister and an American president that I've seen, the relationship itself... the American public support, the military cooperation, security assistance... intel sharing, all of the aspects of this relationship are doing quite well," he told AFP.

Daniel Kurtzer, former US ambassador to Israel and Middle East expert at Princeton University, agreed, saying he believed that "2012 was a year of repairing the personal relationship," highlighting "some real accomplishments."

He pointed to the Iron Dome technology deployed during the November Gaza crisis to shoot down Hamas rockets aimed at southern Israel, and the staunch US opposition to the Palestinian bid for UN recognition as an observer state.

Even Netanyahu's angry appearance at the United Nations wielding a cartoon picture of a bomb to urge America to set red lines over Iran's suspect nuclear program was seen as little more than elaborate grandstanding by analysts. Back home, it fed his desired image as tough on national security.

Iran is set to be one of the top foreign policy challenges in 2013, with Tehran ignoring international calls to halt its production of enriched uranium.

Israelis remain deeply fearful of a nuclear-armed Iran, which has repeatedly denied Israel's right to exist.

Obama's repeated insistence last year, therefore, that he did not bluff, that all options remained on the table if Iran obtains a nuclear bomb sent strong signals to Israel.

"That was a clearer annunciation of American policy on the issue than existed before. I think that notably changed the calculations of the Israelis," said Tamara Cofman Wittes, director of the Saban Center for Middle East Policy at the Brookings Institution.

The threat of unilateral action by Israel against suspected Iranian nuclear sites had receded somewhat in the past 12 months, thanks to both Obama's "crystal clear" stand and toughened sanctions, Wittes told AFP.

Obama's choice for his new national security team, with Senator John Kerry tapped to take over as secretary of state and retired senator Chuck Hagel nominated to lead the Pentagon, should also give both Israel and Iran pause.

The new team "is an Iran cabinet, assembled to decide and act on war or peace over the nuclear file," writes analyst Hussein Ibish, a senior fellow at the American Task Force on Palestine, on his blog, arguing that "this group wants to make a deal."

"Take the deal, or face the consequences of an American action led by a group perfectly positioned ideologically and politically to lead their country, with credibility, into an exceptionally dangerous and risky conflict."

But there is deeper pessimism on whether the two leaders could come together to revive the Middle East peace process, especially given US frustration at the relentless pace of settlement building, and a divided Palestinian people.

"There are things happening every day on the ground that foreclose possibilities that make a two-state solution even harder, and some would argue make it increasingly impossible," Wittes said.

Miller, who has worked as an advisor to six secretaries of state, has said he is convinced Obama wants to try again, and Kerry has long worked to bring the two sides together and is adept at steering difficult negotiations.

Much will depend on how much room for maneuver Netanyahu has after the polls, and the make-up of any eventual coalition, with many radical right-wingers in his Likud party challenging the goal of a two-state solution.