WASHINGTON — In a White House populated by aides who have flamed out, lashed out or cashed out — some do all three in the same day — Hope Hicks, the administration’s communications director, has maintained a low profile as an influential adviser of a mercurial president who prizes her loyalty.

On Friday, President Trump publicly returned the favor.

A day after the departure of Rob Porter, a White House aide who resigned amid domestic abuse accusations, the president dismissed an idea circulated by some aides and allies that he had been unhappy with Ms. Hicks’ role in workshopping an initial forceful defense of Mr. Porter. Ms. Hicks had been dating Mr. Porter until recently.

“Hope is absolutely fantastic,” Mr. Trump said in a statement released through a spokesman. “She was with the campaign from the beginning, and I could not ask for anything more. Hope is smart, very talented and respected by all.”

Ms. Hicks did not know about the specific allegations made against Mr. Porter until Tuesday, according to a White House official. That day, she met with other White House officials in drafting the initial statements sent in Mr. Porter’s defense, according to two West Wing officials.