White House Press Secretary Sarah Sanders will leave her post at the end of June, President Donald Trump has announced.
He said his spokeswoman would return to her home state of Arkansas, praising her as a "warrior".
"She is a very special person with extraordinary talents, who has done an incredible job," Mr Trump tweeted.
She started out as deputy press secretary before replacing Sean Spicer in the top post in July 2017.
Mrs Sanders, 36, has been a loyal mouthpiece, famously saying that God "wanted Donald Trump to become president".
At a White House event on Thursday, Mr Trump described her as "a special person, a very, very fine woman".
"This is something I will treasure forever," she said. "I'm going to continue to be one of the most outspoken and loyal supporters of the president."
The mother-of-three said she was looking forward to spending more time with her children.
"She's a warrior, we're all warriors, we have to be warriors," Mr Trump added.
Mrs Sanders had a combative relationship with the media, often repeating her boss' allegation of fake news.
White House press conferences have become increasingly rare during her tenure.
Mrs Sanders hosted fewer news conferences than any of the preceding 13 press secretaries, according to the American Presidency Project.
Mr Trump has opted to be his own communicator-in-chief, frequently making impromptu remarks to journalists above the buzz of presidential helicopter Marine One on the South Lawn of the White House.
Sarah Huckabee Sanders has been a stalwart defender of Donald Trump's for nearly two years. It's just she hasn't been doing much of that defending in the White House press briefing room - the traditional venue for her position.
The Trump presidency has been unconventional in many regards. The steady erosion of the role of press secretary is only a small but notable part.
Mrs Sanders in recent months spent most of her time appearing on Fox News, answering shouted questions from reporters in the White House driveway, and chatting about mundane off-the-record details.
Trying to explain the president's snap decisions, surprise policy announcements, and unexpected reversals and apparent contradictions in a formal setting was never an easy task, and Mrs Sanders - with the president's apparent blessing - eventually stopped trying.
The president, in effect, is his own press secretary, his own communications director and his own messaging guru. As the last 24 hours of tweets and interviews amply demonstrate, it makes for a wild ride.
Mrs Sanders will eventually be replaced, but her stable presence will surely be missed by the administration staff. The reality, however, is that as long as the man at the top calls the shots, nothing will change.
Mrs Sanders' time in the post was not without controversy, and she was accused of lying to journalists.
After Mr Trump fired FBI Director James Comey in May 2017, she said she had "heard from countless members of the FBI that are grateful and thankful for the president's decision".
But she told special counsel Robert Mueller, during his investigation into whether the Trump election campaign had colluded with Russia, that this claim was "a slip of the tongue" that was "not founded on anything".
In April last year, Mrs Sanders was ridiculed when she attended the White House Correspondents' Dinner.
Comedian Michelle Wolf likened the press secretary to the matronly but terrifying disciplinarian in the TV adaptation of dystopian novel The Handmaid's Tale.
The host was criticised even by some liberals for making a joke about the press secretary's make-up.
Wolf said: "She burns facts and then she uses that ash to create a perfect smokey eye.
Last June, Mrs Sanders dismissed rumours that she would be stepping down.
She is the daughter of Mike Huckabee, who was governor of Arkansas from 1996 to 2007.
In his tweet announcing Mrs Sanders' resignation, Mr Trump wrote that he hoped she would run for the same position.
Mrs Sanders is one of the few remaining aides from Mr Trump's presidential campaign. She became his surrogate on television during his 2016 bid.