South Carolina Gov. Nikki Haley has accepted Donald Trump's offer to be his ambassador to the United Nations. In a statement Wednesday morning, Haley said "I always expected to finish the remaining two years of my second term as governor," but added she was "moved to accept this new assignment" out of a "sense of duty."

"When the President believes you have a major contribution to make to the welfare of our nation, and to our nation’s standing in the world, that is a calling that is important to heed," Haley said, adding that she "remain as governor until the U.S. Senate acts affirmatively on my nomination."

South Carolina Gov. Nikki Haley waves after speaking at the Republican Governors Association annual conference in Orlando, Florida, on Nov. 15. John Raoux / AP

Haley, 44, is a two-term governor who initially backed Trump rivals Sen. Marco Rubio and then Sen. Ted Cruz during the GOP battle for a White House nominee.

She is the first woman in the state's history to hold the role and the first woman picked by the president-elect to serve in a cabinet-level position.

The daughter of immigrants from India, Haley served three terms in South Carolina's State House before winning the governorship in 2010 and again in 2014.

Haley's limited foreign policy experience is likely to draw scrutiny during her Senate confirmation hearings.

If confirmed, Haley would succeed Samantha Power, who has served as President Barack Obama's U.N. ambassador since 2013.

Trump's selection of Haley caps a remarkable year for their political relationship. They started 2016 with a fight and are ending it as allies in a nascent Trump administration.

The pair feuded in January after Haley's Republican response to President Barack Obama's State of the Union, during which she took a thinly-veiled swipe at Trump, warning against "the siren call of the angriest voices."

Haley told TODAY's Matt Lauer the following morning that then-candidate Trump "has definitely contributed to what I think is just irresponsible talk."

"If we have citizens who are law-abiding, who love our traditions, who do everything to be productive citizens in America, they should feel welcome in this country," Haley said. "The reason this country is so great is because the fabric of this country was made by immigrants, and its legal immigrants."

In February, she called Trump "everything a governor doesn't want in a president." The following month Haley endorsed Rubio in the South Carolina primary. Following Rubio's loss and subsequent withdrawal from the race, Haley said it was her "hope and prayer" tha Cruz would win the Republican nomination.

By the Republican National Convention in July, though, Haley had warmed enough to Trump to say she planned to vote for him in a tepid endorsement to MSNBC's Jacob Soboroff.

"I would not be here if I didn't want to make sure that Hillary [Clinton] was not going to be the next president," Haley said in July.

Haley is married to a captain in the Army National Guard who served in Afghanistan, and has two teenage children, according to her biography on the state's website.