WASHINGTON—President Donald Trump announced Thursday that Sarah Huckabee Sanders, his loyal White House press secretary, will step down at the end of the month, and he urged her to run for governor of Arkansas.

“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,” he wrote on Twitter. “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!”

The announcement ends a tumultuous stretch for Sanders, who fiercely defended Trump since his 2016 campaign and jousted regularly with reporters. She presided over the end of the traditional daily news briefing.