Image caption Donald Trump: "Hopefully you'll be coming back at some point ... you can have your pick"

US Ambassador to the UN Nikki Haley has announced she is resigning - after nearly two years in the post.

President Donald Trump appeared in the Oval Office alongside Mrs Haley to say she had done "an incredible job".

The 46-year-old former South Carolina governor - one of the few women in the Trump cabinet - gave no reason for her exit, but dismissed speculation she was planning to run for president in 2020.

Mr Trump said he would name a replacement in two-three weeks.

Image copyright Getty Images Image caption Are Dina Powell and Ivanka Trump top amongst possible Haley successors?

He said he would consider the candidature of Dina Powell - his former deputy security council adviser - and added that his daughter Ivanka "would be dynamite" as ambassador, but that he would be accused of nepotism if he chose her.

Hours later, Ivanka ruled herself out of the race.

Sorry, this Twitter post is currently unavailable.

What did Haley say about her abrupt move?

Mrs Haley did not give details about her move - or what she would do next.

"It's been eight years of intense time, and I'm a believer in term limits," she said referring to her time in public office.

"I don't have anything set on where I'm going to go," she said.

Mrs Haley told journalists she would be campaigning for "this one", pointing to Mr Trump.

Mr Trump said Mrs Haley had told him some time ago she wanted to take some time off.

Image caption President Trump: "I'm not sure there's anyone more competent in the world."

The president said she "has been very special to me, she has done an incredible job, she is a fantastic person, very importantly, but she is also somebody that gets it".

"Hopefully you'll be coming back at some point, right," Mr Trump said. "Maybe a different capacity, you can have your pick." Mrs Haley laughed.

Watch this space

Analysis by Nick Bryant, BBC UN correspondent

Through the revolving door of the Trump administration goes another high-level departure: UN ambassador Nikki Haley, by far the most high-profile woman in the cabinet, and an internationalist who's done much to protect the United Nations from Donald Trump's anti-globalist wrecking ball.

She was a strident critic of Russia and Syria at the UN, and also fiercely critical of what she claimed was the global body's anti-Israel's bias. She supported shutting off US funding for the UN's Palestinian refugee agency and revelled in defending the Trump administration's decision to move its embassy in Israel from Tel Aviv to Jerusalem in the face of an acid show of international criticism. She was also instrumental in pressuring China to support a tough sanctions regime against North Korea.

Sometimes, however, her style grated with colleagues. Her aggressive and repeated warnings about compiling a list of countries that didn't back the United States irritated even close allies. Yet it's often said that the UN's biggest peacekeeping mission is directed against the Trump White House, and Nikki Haley was seen as a valuable ally.

A former governor of South Carolina, she's a talented politician who's widely spoken of as a future female US president. Though she has ruled out challenging Donald Trump in 2020, we have not heard the last of Nikki Haley.

Who is Nikki Haley?

Born Nimrata Randhawa to Indian immigrant parents, she was raised as a Sikh in Bamberg, South Carolina, later converting to Christianity

Her first job as a 13-year-old was bookkeeping for her family's clothing store

In 2010, she became South Carolina's first female and first minority governor - and youngest governor in the US - and was re-elected in 2014

She received nationwide praise for removing the Confederate flag from the state capitol after a mass shooting on black churchgoers in Charleston in 2015

She did not initially endorse Mr Trump during the 2016 campaign, instead backing Florida Senator Marco Rubio

Mrs Haley is married to Army National Guard Captain Michael Haley, and the couple have two teenage children

Has Mrs Haley's tenure been smooth?

Mrs Haley's resignation comes a day after an anti-corruption watchdog accused her of accepting seven luxury private plane trips as gifts from South Carolina business leaders.

Image caption Haley: 'Jared is such a hidden genius'

Citizens for Responsibility and Ethics in Washington said Mrs Haley had undervalued the cost of the flights by tens of thousands of dollars in an annual financial disclosure report.

Sorry, this Twitter post is currently unavailable.

In April, Mrs Haley clashed with the White House when a Trump aide suggested she had prematurely announced a round of sanctions against Russia.

White House economic adviser Larry Kudlow suggested she had got "ahead of the curve" and had a "momentary confusion".

But she fired back hours later telling Fox News: "With all due respect, I don't get confused."

Mrs Haley was a frequent critic of Mr Trump during his election campaign.

She had said that women who accused him of sexual assault "should be heard".

At one point she suggested that Mr Trump's rhetoric could trigger a world war.

What is the reaction to her departure?

Republican lawmakers praised Mrs Haley on Tuesday after news of her resignation broke.

Retiring Speaker of the House Paul Ryan said: "She challenged friend and foe to be better."

South Carolina Senator Lindsey Graham said she had been "a true agent of reform" at the UN.

Senator Robert Menendez, the top Democrat on the Senate Foreign Relations Committee, called her departure "yet another sign of the Trump Administration's chaotic foreign policy".

He added that he is "deeply concerned about the leadership vacuum she leaves and the national security impact of her departure at this time of continued disarray".