Israeli Prime Minister Benjamin Netanyahu has praised the outgoing US ambassador to the United Nations for her “uncompromising” struggle for Israel, as Palestinians talked of their relief at her departure.

Nikki Haley, 46, the former South Carolina governor, announced her unexpected resignation on Tuesday after less than two years in the UN post.

The outspoken politician had sparked controversy in the Middle East for her fervent support for Israel and hawkish line on Iran, Israel’s chief foe.

Several Israeli leaders including the premier expressed their sadness at her decision to leave.

"I thank ambassador Nikki Haley for her uncompromising struggle against the hypocrisy of the UN," Mr Netanyahu wrote in Hebrew on his official Twitter account, wishing her success in her future endeavours.

Israel's UN ambassador, Danny Danon, in a statement wrote: "Thank you, Nikki Haley! Thank you for standing with the truth without fear."

Meanwhile, the country's education minister Naftali Bennett, who is also head of the far-right Jewish Home party, echoed the sentiment.

"On behalf of the Israeli people: Thank you for what you've done for Israel. We will not forget," he tweeted.

Israeli commentators noted that it was unlikely that Ms Haley’s successor would be able to “match her zeal” for Israel and bemoaned that the country had lost a major ally.

However, the Palestinian leadership said that the US politician's pro-Israel agenda was "horrible" and that “no one would cry for her departure”.

"We don't interfere in the appointment of American positions, however Haley isolated the US in speaking on behalf of Israel," Nabil Abu Rudeina, a spokesman for the Palestinian Authority and Palestinian President Mahmoud Abbas told The Independent.

"Vocally she was horrible but in the end she was representing White House policy which we are against. Haley was not for us or a peaceful resolution [to the crisis]. She was not a good representative – she followed an Israeli agenda."

"We hope for a better person and policy from the White House according to international law ... We would like to hear an American representative, not an Israeli one," he added.

Palestinian commenters, meanwhile, welcomed her departure, saying her term in office had been a “nightmare” for the Palestinian cause.

Nikki Haley says her stepping down is 'not for personal reasons'

“Today, as Ambassador Haley leaves office, she ends a two-year-long nightmare for the Palestinians and for those hopeful to reach a peaceful settlement in the Israeli Palestinians conflict,” wrote Mohamed Shehada, a commentator and analyst based in Gaza.

"She repeatedly pledged to shield Israel from any criticism, further empowering Netanyahu’s fanatical cabinet and leaving their dangerous ambitions unchecked,” he added.

Ms Haley spearheaded the US administration’s efforts to combat what it alleged were unacceptable anti-American and anti-Israel actions by the UN. That included leading the US decision to leave the Human Rights Council and to stop funding UNRWA, the UN agency for Palestinian refugees.

Riyad Mansour, observer to the UN for the Palestinians, has in the past accused Ms Haley of "becoming more Israeli than the Israelis themselves".

Evidence of a secret atomic warehouse in Tehran is presented by Israeli prime minister Benjamin Netanyahu (Timothy Clary/AFP/Getty) (Timothy Clary/AFP/Getty Images)

She had controversially dismissed as “off the table” the Palestinian claim to “right of return” to lands they fled or were forced from during the conflict surrounding the creation of Israel, as well as subsequent conflicts.

The so-called "right of return" is one of the sticking points of the peace process.

Last month Ms Haley also defended the US decision to cut its funding to UNRWA, saying the Palestinians had done nothing but beg and “badmouth” Washington. She also refused to listen to a Palestinian delegation speak during a UN Security council chamber meeting in May and blocked the appointment of Salam Fayyad as UN envoy to Libya because he is Palestinian.

Meanwhile she was met with rapturous applause in 2017 when she first spoke before the American Israel Public Affairs Committee’s (AIPAC) annual conference and told the crowds “there’s a new sheriff in town” and that the US had no greater friend than Israel.

As she announced her resignation on Tuesday she said she had given “everything” she had to the job.