WATCH ABOVE: The timeline surrounding who among senior White House officials knew what details in the allegations against former White House aide Rob Porter continues to take shape, as President Donald Trump says he did a "very good job" and wished him well.

U.S. President Donald Trump said Friday that a former aide accused of domestic abuse by two ex-wives had done a “very good job” at the White House, adding, “We certainly wish him well.”

Trump emphasized that former staff secretary Rob Porter maintains his innocence, and the president made no mention of the women who have reported physical and emotional abuse.

It was Trump’s first comment on the allegations against Porter, who has been one of his most trusted staffers until this week. Porter resigned after his ex-wives’ allegations became public.

Trump offered sympathy for Porter, saying:

“It’s a, obviously, tough time for him. He did a very good job when he was in the White House. And we hope he has a wonderful career.”

Trump said he was sad to learn of the allegations, but added: “As you probably know, he says he’s innocent. And I think you have to remember that.”

WATCH: Trump wishes Rob Porter well after resignation

The comments came the day after White House chief of staff John Kelly tried to assure staff that the Trump administrations takes domestic violence “very seriously” amid mounting questions about how Porter managed to maintain a position of high influence despite the allegations.

Porter, who was arguably White House chief of staff John Kelly’s closest aide, cleaned out his desk on Thursday. The fallout from his resignation reverberated amid concerns about his access to classified information and about how long senior staffers had known about the allegations.

Porter has denied the allegations, calling them “outrageous” and part of “a coordinated smear campaign.”

Though the accusations against Porter became public this week, Kelly learned last fall that something was amiss with the staff secretary’s attempts to get a security clearance, according to an administration official who was not authorized to publicly discuss internal matters and spoke on condition of anonymity.

The chief of staff had sought information about the status of security clearance applications for top aides, and it was then he learned there were allegations against Porter from his ex-wives, said the official. Porter and Kelly later discussed the allegations. The official said White House counsel Don McGahn was apprised of at least some of the accusations at least four times, including in January 2017, the official said.

That includes in November, when one of Porter’s ex-girlfriends called McGahn to describe allegations of domestic abuse against him.

The person stressed that the FBI had at no point revoked Porter’s security clearance, which they could have done.

The White House official said that staffers felt misled about how Porter downplayed the allegations, both to Kelly and McGahn. Kelly himself faced criticism for initially defending his aide — only to later shift course after the publication of photos showing one of Porter’s ex-wives with a black eye.

“It’s fair to say we all could have done better over the last few hours or last few days in dealing with this situation,” said White House deputy press secretary Raj Shah, who faced a barrage of questions about Kelly during a press briefing Thursday.

Kelly sent a memo to staff late Thursday in which he wrote that “while we are all processing the shocking and troubling allegations made against a former White House staffer, I want you to know that we all take matters of domestic violence very seriously. Domestic violence is abhorrent and has no place in our society.”

When the allegations first emerged against Porter a number of senior aides rallied around him, and the White House acknowledged that personal relationships may have played a role in their response. Communications Director Hope Hicks, who was dating the staff secretary, helped draft the original statements defending him, according to three current and former White House officials.

Shah said Thursday that Hicks later “recused” herself from some aspects of the matter, but it was unclear from what. Kelly, meanwhile, was Porter’s loudest defender, including in the first hours after the graphic photos of alleged abuse emerged.

Only later did the chief of staff, who had argued for Porter to keep his post, release a second statement in which he said he supported Porter’s resignation.

Shah said that Trump was not aware until Tuesday of the accusations against Porter, who was a frequent presence in the Oval Office and helped craft last week’s State of the Union address. By the time the president was fully briefed of the claims against Porter on Wednesday, the once-rising White House star had already resigned, according to the official.

WATCH: Trump ‘saddened’ by Porter abuse allegations

A number of lawmakers criticized Kelly, and a leading women’s group called for the chief of staff to resign.

The president, for his part, has not signaled to allies that he is on the verge of making a change. But his frustration with Kelly has grown in recent weeks.

Trump has long resisted Kelly’s attempt to control him. In recent weeks, the president has complained about the chief of staff to his circle of informal advisers, according to two people who speak to the president regularly but are not authorized to publicly discuss private conversations. One of the people said Trump was angry that Kelly did not bring the Porter allegations to him sooner.

Kelly also drew Trump’s ire last month when he seemed to suggest that the president was flip-flopping on his call for a border wall. Trump complained to aides that the chief of staff had portrayed him as a child who had to be managed, a contention that particularly irked the president in the wake of the way he was portrayed in the recent Michael Wolff book, “Fire and Fury.”

Though Trump frequently vents about senior aides, he is often loath to fire staffers. A dismissal of Kelly would surely revive the narrative of a White House in crisis as it faces the ongoing Russia probe and the midterm elections.

But Kelly’s handling of the Porter affair rattled some aides, who questioned his full-throated defense of an accused batterer, according to more than a half-dozen White House officials and outside advisers who were not authorized to speak publicly about private conversations.

Democratic swiftly called for an investigation into Porter’s presence at the White House.

“If John Kelly is covering this up, he needs to be held accountable,” Sen. Jon Tester, D-Mont., told CNN’s “New Day,” adding, “He better have a really good reason. Otherwise, he’s gone, too.”

Toni Van Pelt, head of the National Organization for Women, was more direct. She revisited the accusations that Trump himself has sexually harassed women, allegations he has denied.

“White House chief of staff John Kelly must resign,” said Van Pelt.

“His pathetic defense of staff secretary Rob Porter reveals his true nature — an enabler of sexual abusers, a betrayer of trust and an avoider of responsibility.”

The White House was also put on the defensive about Porter’s interim security clearance, fielding questions about how someone could handle some of the nation’s most sensitive documents while potentially being ripe for blackmail. In Thursday’s briefing, Shah outlined the background check procedure, which is run by the federal law enforcement and intelligence agencies and was still underway for Porter.

Both of Porter’s ex-wives have detailed the nature of the abuse they said they suffered at Porter’s hands and said they informed the FBI. One of them, Jennifer Willoughby, posted about it in detail on Instagram in April 2017 and wrote of Porter that “When I tried to get help, I was counseled to consider carefully how what I said might affect his career.”