After six years of testy relations, US President Barack Obama may have to resign himself to the likelihood that he has not seen the last of Benjamin Netanyahu.A better-than-expected showing by the Israeli prime minister in Tuesday's closely fought election raises the prospect that he could remain a thorn in Obama's side, with the two men increasingly at odds over Iran diplomacy and Middle East peacemaking.US officials responded cautiously as they waited to see whether Netanyahu or his center-left challenger, Isaac Herzog, would get the nod from Israel's president to begin the long and messy coalition-building process.Clearly the result that many of Obama's supporters had hoped for - a repudiation by Israeli voters of Netanyahu's hard-line approach - was not to be. Exit polls showed that his Likud party had erased its rival's pre-election lead, putting the two sides in a dead heat."Looks like the White House will need to let the champagne chill a bit longer," Aaron David Miller, a former Middle East negotiator for Republican and Democratic administrations, tweeted about the election outcome.The election came just two weeks after Netanyahu defied Obama with a politically divisive speech to Congress attacking US-led nuclear talks with Iran. The final days of campaigning only served to deepen tensions between the right-wing leader and Washington.Even as they insisted publicly on non-intervention in the Israeli campaign, Obama's aides were taken aback by Netanyahu's reversal of his previous declaration of support for creating a Palestinian state, a longstanding cornerstone of US policy.Netanyahu also drew a rebuke from the US State Department for suggesting on election day that left-wingers were trying to get Arab-Israeli voters out "in droves" to sway the election against him."Netanyahu has managed an uphill climb in the last few days," said David Makovsky, a former member of Obama's team in Israeli-Palestinian peace talks that collapsed last year."The way he has survived was to cannibalize part of the right and also adopt policy positions that are bound to create further friction with Washington," said Makovsky, now at the Washington Institute for Near East Policy. "He's going to be in the next government one way or another."Netanyahu could have the easier path to forming a cabinet, which would put him on course to becoming Israel's longest serving leader.That prospect may not bode well for repairing US-Israeli ties after Netanyahu's congressional speech, which he delivered at the invitation of Obama's Republican opponents despite strong objections from the president and many of Obama's fellow Democrats.US officials had left little doubt of their hope for an election outcome that would create a new ruling coalition more in sync with - or at least less hostile to - Obama's agenda, especially with an end-of-March deadline looming for a framework nuclear deal in negotiations between Tehran and world powers.As a prime minister, Zionist Union leader Herzog would be expected to take an Obama-friendlier course less confrontational over Iran and more open to renewed peacemaking with the Palestinians.It would also be a chance to get past six years of slights, mutual suspicion and even antipathy at the top of the US-Israeli relationship and return to traditional bipartisanship in Congress on the issue of Israeli security.That will not be easy if Netanyahu remains in office - though some analysts suggest that tensions with Obama could be eased along with the threat of international isolation if the rivals decide to form a broad-based national unity government.Efforts already were under way in Washington to lower the temperature."People say a lot of things during campaigns," State Department spokeswoman Marie Harf told CNN when asked about Netanyahu's apparent reversal on Palestinian statehood."What we're focused on is the Israelis moving forward, forming a government and we will work with whoever is prime minister to see if we can make progress in what is a very tough and difficult area to do so," she said.Nancy Pelosi, the House of Representatives Democratic minority leader, said that as someone who loves Israel, she was "near tears" during Netanyahu's March 3 address, calling his remarks an "insult to the intelligence of the United States."But on Tuesday, she said the US-Israeli relationship would stay strong, whoever won, and declined to weigh in before the result on whether Netanyahu's speech hurt him."It's a very, very ... intellectual relationship, security relationship and an emotional one as well," she told reporters.Underscoring the partisan divide over Netanyahu, Republican US Senator Ted Cruz said: "His electoral success is all the more impressive given the powerful forces that tried to undermine him, including, sadly, the full weight of the Obama political team."