Nikki Haley announced Tuesday she would resign from her post as United States ambassador to the United Nations effective at the end of 2018, and President Donald Trump is already publicly considering who should replace her.

Trump accepted Haley's resignation and said at the meeting with reporters present that she had told him months ago she intended to serve for less than two years. Trump was effusive in his praise of Haley, saying she could have "her pick" of roles if she decided to come back to the administration.

But just hours after Haley's announcement, Trump had already begun speculating on who could replace Haley, indicating that a short list of five people had been created and that it included Dina Powell, his former deputy national security adviser.

Trump told reporters outside the White House that he has heard his daughter​ Ivanka's name being discussed for the post. He said he was certain Ivanka would be "incredible" in the role, but added he knows if he selected her he'd be accused of nepotism.

"I've heard a lot of names. I've heard Ivanka. The people that know, it's nothing to do with nepotism. But I want to tell you, the people that know, know that Ivanka would be dynamite," Trump said.

Watch as Trump talks about possible replacements, including his daughter Ivanka:

U.S. president speaks to reporters about potential candidates to succeed Nikki Haley 0:47

Ivanka Trump later quashed any speculation she would be appointed to take over from Haley.

"I know that the president will nominate a formidable replacement for Ambassador Haley. That replacement will not be me," she tweeted.

It is an honor to serve in the White House alongside so many great colleagues and I know that the President will nominate a formidable replacement for Ambassador Haley. That replacement will not be me. —@IvankaTrump

Earlier Tuesday, Haley called the ambassadorship "an honour of a lifetime" and pointed to moving the embassy in Israel to Jerusalem, cutting the UN budget by $1.3 billion US and helping to broker an arms embargo in South Sudan as accomplishments.

Haley has been the face of Trump's "America First" policy at the United Nations, steering the U.S. withdrawal from several UN programs and ardently defending his hardline policies against Iran and North Korea over their nuclear programs.

"Now the United States is respected," she said. "Countries may not like what we do, but they respect what we do. They know that if we say we're going to do something, we follow it through."

After an anonymous essay in the New York Times from an administration official brought up the spectre of Trump's competence for the presidency, Haley wrote a defence in a Washington Post op-ed.

"I proudly serve in this administration, and I enthusiastically support most of its decisions and the direction it is taking the country," wrote Haley. "But I don't agree with the president on everything."

'True agent of reform'

While thanking her husband and two children for their support on Tuesday, Haley said the reasons for her departure weren't personal.

"I think it's very important for government officials to understand when it's time to step aside," she said.

The move will raise speculation about her political future nonetheless.

Nikki Haley has a very bright future and will be a key player in both the future of the Republican Party and our nation as a whole for years to come. —@LindseyGrahamSC

Haley, 46, served as South Carolina's governor from 2011 until she was nominated by Trump to the UN post, a move that surprised some observers given her lack of foreign policy experience.

As well, Haley had campaigned for Marco Rubio during the Republican primaries, with Trump at one point tweeting "the people of South Carolina are embarrassed by Nikki Haley."

Haley campaigns for Marco Rubio on Feb. 17, 2016, during a rally in Chapin, S.C., but any friction between her and Trump was forgotten months later as she was nominated to be UN ambassador. (Chris Keane/Reuters)

She was that state's first female governor.

Haley said she has no intention of running for office in 2020 and promised to campaign for Trump.

Republican Sen. Lindsey Graham, of South Carolina praised Haley as "a true agent of reform when it came to the United Nations" and predicted she would be heard from again in national politics.

Democrat Sen. Bob Menendez of New Jersey thanked Haley for her service in a statement but decried the surprise resignation as "yet another sign of the Trump administration's chaotic foreign policy." The White House in less than two years has seen Secretary of State Rex Tillerson and national security adviser H.R. McMaster depart, with Mike Pompeo moved after just a short time as CIA director to fill the Tillerson vacancy.

'Arrogant discourse': UN Palestinian rep

United Nations secretary general Antonio Guterres expressed on Tuesday his "deep appreciation for the excellent co-operation and support" Haley provided, his spokesperson Stephane Dujarric said.

"They had a very productive and strong working relationship," Dujarric told reporters.

Danny Danon, Israel's ambassador to the UN, praised Haley on social media, saying she'd "always be a true friend to the State of Israel."

Haley left the UN session in May as Riyad Mansour, lower left, Palestinian observer to the UN, prepared to address the Security Council. (Mary Altaffer/Associated Press)

Her legacy will be less kind to many in the Arab world after both the controversial embassy move and the slashing of millions in humanitarian aid to Palestinians by the Trump administration.

Riyad Mansour, observer to the UN for the Palestinians, has previously accused Haley of "arrogant discourse" and "becoming more Israeli than the Israelis themselves."

When Mansour moved to speak in May at a UN Security Council session in the wake of dozens of Palestinian deaths near the Israeli-Gaza border, Haley walked out.

Marc-André Blanchard, Canada's ambassador to the UN, tweeted Tuesday that Haley "should be proud" of her accomplishments as ambassador.

"I have so enjoyed working with you and even more getting to know you as a friend," Blanchard tweeted.

.<a href="https://twitter.com/nikkihaley?ref_src=twsrc%5Etfw">@nikkihaley</a> you should be proud of all you have accomplished <a href="https://twitter.com/UN?ref_src=twsrc%5Etfw">@UN</a>. I have so enjoyed working with you and even more getting to know you as a friend. Best to you, Michael, Rena and Nalin. <a href="https://t.co/a4Kc7qQYQl">pic.twitter.com/a4Kc7qQYQl</a> —@blanchardCanada

While a resolution declaring "null and void" the U.S.'s recognition last year of Jerusalem as Israel's capital passed 128-9, Canada was one of about three-dozen countries to abstain from the vote.

Haley's replacement will require confirmation by the Senate, with over one-third of the seats in that legislative body being contested in next month's midterm elections. Haley was confirmed with 96 of 100 votes.

With files from The Associated Press and Reuters