President Trump has accepted Nikki Haley’s resignation as UN Ambassador, the two said Tuesday morning in a public Oval Office meeting. She will exit at the end of the year, Trump said, and he plans to decide on a replacement in the coming weeks.

What we're hearing: Haley discussed her resignation with Trump last week when she visited him at the White House, two sources said. Her news shocked a number of senior foreign policy officials in the Trump administration.

Axios was first to report the resignation earlier in the day.

Trump told reporters Tuesday that Haley raised the possibility of taking a break six months ago, and that she's welcome back at any time.

Haley, for her part, added that she has no 2020 ambitions and will campaign for the president.

Background: Haley, the former governor of South Carolina, was easily confirmed four days after President Trump's inauguration in 2017.

She has overseen Trump's shift in dealing with the UN, including the U.S. exit from the UN Human Rights Council, which Haley called the organization's "greatest failure."

Worth noting: Haley wrote a public op-ed in September challenging the N.Y. Times' anonymous op-ed, which was written by a "senior administration official" and claimed that Trump aides saw him as a threat to U.S. democracy.

Haley wrote in her response:

"I don’t agree with the president on everything. When there is disagreement, there is a right way and a wrong way to address it. I pick up the phone and call him or meet with him in person."

"Like my colleagues in the Cabinet and on the National Security Council, I have very open access to the president. He does not shut out his advisers, and he does not demand that everyone agree with him. I can talk to him most any time, and I frequently do."

"If I disagree with something and believe it is important enough to raise with the president, I do it. And he listens."

Editor's Note: Get more stories like this in our weekly political lookahead newsletter, Axios Sneak Peek. Sign up here.