White House press secretary Sarah Huckabee Sanders is leaving the White House, marking another high-level departure of one of the few remaining aides to President Trump. Sanders told reporters she won't rule out a run for governor in Arkansas.

It isn't immediately clear who will replace her. The president first announced Sanders' impending departure in a tweet.

"After 3 1/2 years, our wonderful Sarah Huckabee Sanders will be leaving the White House at the end of the month and going home to the Great State of Arkansas," Mr. Trump wrote Thursday afternoon. "She is a very special person with extraordinary talents, who has done an incredible job! I hope she decides to run for Governor of Arkansas - she would be fantastic. Sarah, thank you for a job well done!"

Get Breaking News Delivered to Your Inbox

"I am blessed and forever grateful to @realDonaldTrump for the opportunity to serve and proud of everything he's accomplished," Sanders followed up in a tweet. "I love the President and my job. The most important job I'll ever have is being a mom to my kids and it's time for us to go home. Thank you Mr. President!"

Mr. Trump again encouraged Sanders to run for governor in a prison reform event in the White House East Room Thursday afternoon: "I'm trying to get her to do that."

Sanders, called on stage during the event Thursday afternoon, said the chance to serve the president and the country was the "opportunity of a lifetime." She pledged to continue to promote and defend the president's agenda from outside of government.

"I'll try not to get emotional because I know that crying can make us look weak sometimes right?" Sanders said, looking at the president and smiling. "This has been the honor of a lifetime, the opportunity of a lifetime. I couldn't be prouder to have had the opportunity to serve my country and particularly to work for this president. He has accomplished so much in these two and a half years and it's truly been something I will treasure forever.

"It's one of the greatest jobs I could ever have, I've loved every minute. Even the hard minutes, I have loved it," she added.

Many White House staffers found out Sanders would depart during a 3 p.m. meeting.

Sanders, the daughter of former Arkansas governor Mike Huckabee, has served in the White House since the beginning of Mr. Trump's presidency, taking over for Sean Spicer when he left that role.

CBS News reported exactly a year ago that Sanders had been telling friends she intended to leave the administration at the end of the year, but that timeline was extended. Sources close to Sanders told CBS News she was planning on leaving last year, but decided against that after her then-principal deputy press secretary Raj Shah decided to leave the administration. Sources close to Sanders also said she would consider a political career in Arkansas, but not for a while. She wants to spent time with her family and three young children.

Sanders, sources close to her said, represented a strong fabric, even when internal factions consumed the White House in the early days of the administration.

White House press briefings became less and less frequent occasions under Sanders. The last White House briefing was more than 90 days ago.

It's unclear if briefings would become more frequent under anyone who might replace her.

The job of White House press secretary is challenging under any presidency — but arguably, particularly under Mr. Trump, who oftentimes contradicts his own staff on Twitter or in gaggles with reporters. Shah, the former principal deputy press secretary who worked with Sanders, praised her tenure.

"She did an incredible job defending the president with an often hostile press corps. And everybody who worked with her found her to be incredibly humble and she was an incredible friend, and mentor to me. She was the best boss I ever had," Shah said.