Image copyright Getty Images Image caption Governor Haley was critical of Mr Trump during his presidential campaign

The US ambassador to the UN, Nikki Haley, has resigned after only 19 months in the role.

Mrs Haley, the daughter of Indian immigrants, was appointed to the role by President Donald Trump in January 2017.

The former South Carolina governor was a vocal critic of the property mogul on the campaign trail but later voted for him, lamenting that she was "not a fan" of either Mr Trump or Hillary Clinton.

The 46-year old has been an outspoken envoy to the UN, removing the US from the UN Human Rights Council (UNHRC) after accusing it of bias.

Rising star

Born Nimrata "Nikki" Randhawa, Mrs Haley was the first minority and female governor of South Carolina, a deeply conservative state with a long history of racial strife.

The Indian-American was elected in 2010 and served two terms, riding the wave of the Republican Tea Party with the support of former Alaska Governor Sarah Palin.

As the youngest governor in the US and only the second Indian-American to serve at the helm of a US state, she was touted as a rising star within the Republican Party.

She took a public stand against resettling Syrian refugees in South Carolina and also opposed President Barack Obama's signature healthcare law.

Her re-election win in 2014 also marked the largest margin of victory for a South Carolina gubernatorial candidate in 24 years.

Before becoming the state's chief executive, she served for six years as a member of the South Carolina House of Representatives.

She is married to Army National Guard Captain Michael Haley and has two children.

An accountant and businesswoman, Mrs Haley was raised in a Sikh household but converted to Christianity and attends a Methodist church.

Her first job was bookkeeping for her family's clothing store at the age of 13.

Taking a stand

Image copyright Getty Images Image caption Mrs Haley called for the state removal of the Confederate flag following the Emanuel AME Church shooting

Mrs Haley attracted national attention in 2015 when she asked the state legislature to remove the Confederate battle flag from the Capitol following a racially charged massacre that left nine people dead at a Charleston church.

The state has long wrestled with its connection to the divisive flag, which is considered by many as a totem of racism but defended by others as an important historical symbol.

"Today, we are here in a moment of unity in our state, without ill will, to say it is time to move the flag from the Capitol grounds," said Mrs Haley at a news conference.

"One hundred and fifty years after the end of the Civil War, the time has come."

Though she had previously supported preserving the flag's symbolism of Southern Heritage, the governor signed a bill requiring its removal and the flag was taken down in July 2015.

Trump U-turn

Image copyright Getty Images Image caption Mrs Haley endorsed Senator Rubio and then Senator Cruz before she finally backed Mr Trump

For the 2016 presidential bid, Mrs Haley endorsed Florida Senator Marco Rubio during the Republican primary election and after he dropped out, threw her support behind Senator Ted Cruz - Mr Trump's final rival before he became the party's nominee.

The then-governor also urged Mr Trump to release his tax returns and criticised his harsh campaign rhetoric throughout the primary election.

She also confronted the then-frontrunner's call to temporarily ban Muslims from the country, adding: "No-one who is willing to work hard, abide by our laws, and love our traditions should ever feel unwelcome in this country."

Mr Trump lashed out by calling the then-governor "very weak on immigration" and tweeted she was an embarrassment to the state.

She responded in a tweet: "Bless your heart", which is often viewed as condescending dismissal in the South.

However, she finally voted for Mr Trump and after he won the election, she was announced his pick for US envoy to the UN.

Mr Trump praised his former critic as a "proven dealmaker" and said she would "be a great leader representing us on the world stage".

Outspoken envoy

Image copyright Getty Images Image caption Mr Trump said Mrs Haley was doing "an incredible job" as US ambassador to the UN

Mrs Haley joined Mr Trump's cabinet as US envoy to the UN shortly after his inauguration in January 2017.

The former South Carolina governor had little foreign policy experience, though she did travel abroad to broker economic deals for her state.

She soon stood out as an outspoken critic on the international stage - voicing her opinion on policy issues like North Korea and engaging in verbal battles with Russia over Syria's alleged use of chemical weapons against its citizens.

In June, she berated human rights groups for trying to "thwart reform" of the UNHRC - which the US then withdrew from, calling it a "cesspool of political bias".

Mrs Haley had earlier said it was "hard to accept" that resolutions had been passed against Israel, a US ally, but none considered on Venezuela and not enough done to criticise Iran.

At the time of her resignation, she had just served as temporary president of the UN Security Council for a month.