Hicks, who has been working with the president for three years, managed to stay in his orbit even after many others had been pushed out. President Trump called Hicks "outstanding."

"She is as smart and thoughtful as they come, a truly great person," Trump said in a statement on Wednesday. "I will miss having her by my side but when she approached me about pursuing other opportunities, I totally understood. I am sure we will work together again in the future."

News of Hicks' departure followed a day after she testified for hours before a closed session of the House intelligence committee as part of its Russia probe, reportedly admitting to telling "white lies" on behalf of the president, though not in matters material to the investigation. Lawmakers are investigating Russia's interference in the 2016 presidential election and whether any Trump campaign associates aided that effort. The White House has repeatedly denied any such collusion.

Earlier this month Hicks was deeply involved in the White House's botched handling of domestic abuse allegations against a former top aide to the president. But a White House official insists Hicks' decision to resign wasn't related to either of those matters.

Another person close to Hicks told NPR the resignation has been in the works for weeks.

In a White House full of big personalities, the 29-year-old former teen fashion model has had a knack for maintaining a low profile; that is, until recently. She was often photographed with other White House aides but rarely went on the record and almost never spoke before microphones.

"I think it's a skill ... to avoid being in the press," Dana Perino, who served as White House press secretary during the George W. Bush administration, told NPR in August. "She is a true communications professional in that she doesn't seek the limelight."

That skill, along with her apparently unwavering loyalty, helped keep her in the president's good graces. That loyalty was once again on display in a quote circulated by the White House announcing her departure.

"There are no words to adequately express my gratitude to President Trump," Hicks said in the statement. "I wish the President and his administration the very best as he continues to lead our country."

Hicks joined the Trump organization in 2014 — recruited by Ivanka Trump, who was impressed by work Hicks had done for her clothing line while working at a New York public relations firm. Hicks was then pulled into the Trump campaign before there even was a campaign, becoming de facto press secretary while initially she continued doing work for the Trump Organization.

"She really understood the president's brand, that he's a mogul, that he's a magnate," said Sam Nunberg, who served as an adviser to Trump from 2011 to mid-2015. "And she said to me that people in the primary states were going to view him as a president because they watched him on The Apprentice. Which was true."

Hicks was serving as the White House's director of strategic communications, an unusual role where she essentially functioned as a gatekeeper to the president, when she was named interim communications director in August. That followed the days-long tenure of Anthony Scaramucci and the departure of multiple other communications directors — Sean Spicer, who had also been press secretary; Mike Dubke; and Jason Miller, who served during the transition.

Nunberg predicted at the time of her promotion that Hicks would be with Trump "to the very end."

Even so, on Wednesday, the aide who was so close to Trump she was often described as being like family said she, too, would leave.

Copyright 2018 NPR. To see more, visit http://www.npr.org/.

ARI SHAPIRO, HOST:

President Trump's longest-serving aide is leaving the White House. Hope Hicks has been at Trump's side since before the start of his presidential campaign nearly three years ago. Today she's the White House communications director, and the White House says she will leave that job in the coming weeks. NPR's Tamara Keith joins us now from the White House. Hi, Tam.

TAMARA KEITH, BYLINE: Hey.

SHAPIRO: How big of a shock is this?

KEITH: This is a shock in a lot of ways because she has been sort of the ultimate survivor of the Trump administration and the Trump campaign and was truly one of his most loyal aides. But it does come at a time when she was making a lot of headlines and for all the wrong reasons.

Yesterday she testified before the House Intelligence Committee as part of its Russia investigation behind closed doors and reportedly admitted to telling white lies for the president but not as it relates to Russia. She had also been deeply involved in what was a multi-week controversy for the White House about former staff secretary Rob Porter, who had been accused by his two ex-wives of domestic abuse. The White House handled that in a way that is - was arguably terrible and made it drag on for longer. And she had also reportedly been dating Porter in addition to crafting the White House response.

But, you know, one person close to Hicks told NPR that this had been in the works for weeks and that it absolutely wasn't related to her testimony yesterday before the Intelligence Committee.

SHAPIRO: As we said, she's been by Trump's side constantly since before he started running for president. Talk about her role in his world.

KEITH: Yeah, so she joined the Trump campaign from its very first day - from before its very first day. President Trump put out a statement saying, quote, "I will miss having her by my side, but when she approached me about pursuing other opportunities, I totally understood. I am sure we will work together again in the future."

The thing about Hope Hicks - she was an - she was, like, the ultimate gatekeeper to Trump. If a reporter wanted to talk to Trump, they had to go through Hicks. But the thing about her was that she was not a public person, which is remarkable in this White House where everyone becomes a celebrity. Last year I did a story about her, and we were looking around for any tape of where she spoke publicly. And all we could find was this rally after the election where President Trump basically dragged her up onto stage.

(SOUNDBITE OF ARCHIVED RECORDING)

PRESIDENT DONALD TRUMP: You know, she's a little shy, but that's OK because she is really, really talented. Hope, say a couple of words.

SHAPIRO: And she also didn't have a background in politics. Talk about how she entered the Trump orbit in the first place.

KEITH: Yeah, so she came into Trump's orbit by way of Ivanka Trump. She was brought into the Trump organization to work for Ivanka. She before that had been at a PR firm where she was doing work for Ivanka's fashion line. And here's the other fun fact about Hope Hicks. Her - when she was a teenager, she was a fashion model.

SHAPIRO: There has been a nearly unprecedented amount of turnover in the White House, including in the job of communications director. Hope Hicks was, depending how you count it, the fourth or fifth person to hold the job since Trump became president. Do you think this portends yet more turnover, a larger staff shakeup?

KEITH: You know, the Trump White House is in a permanent state of flux. On any given day, there are multiple names out there who are thought to be in trouble or potentially on their way out. This one wasn't necessarily expected, but the Trump administration is setting records for staff turnover.

SHAPIRO: NPR's Tamara Keith speaking with us from the White House. Thanks, Tam.