On Tuesday afternoon, senior White House officials reached out to Sen. Orrin Hatch’s (R-UT) office with an urgent request. They needed the Utah Republican to put together a statement praising his former chief of staff and then-White House Staff Secretary Rob Porter.

At issue was a story that was about to pop from the British tabloid, the Daily Mail, in which two of Porter’s ex-wives detailed the emotional and physical abuse they endured by him.

The White House officials told Hatch’s office that the story was the product of a “smear campaign” being orchestrated against Porter by his political enemies. Among those they pinpointed was former Trump campaign manager (and current outside adviser to the president) Corey Lewandowski, according to two sources familiar with the conversations. Multiple White House staffers told Hatch himself that Lewandowski “was digging into Rob’s previous marriages,” recalled one source, who said Porter himself was among the officials who fingered Lewandowski.

Reached by phone on Thursday, Lewandowski flatly denied that he had anything to do with the allegations against Porter. “I’ve never had a bad word about Rob Porter,” he insisted. “I think he did a very good job, and I wish him the very best.” Lewandowski had, indeed, been speaking critically of Porter behind the scenes, as The Daily Beast previously reported. But he said he was surprised to learn that senior White House officials had implicated him in an alleged campaign to facilitate his ouster.

Hatch’s office ultimately sent the statement to the White House before the Daily Mail’s first story surfaced—and before, the source said, Hatch knew that his former staffer was being accused of physically assaulting his ex-wife, or that a story on the allegations was imminent. But Hatch largely stood by his sentiments the next day, when he encouraged Porter to “keep a stiff upper lip and work on his problems.”

By that point, Porter had already announced his resignation, making the frantic effort to save his job both moot and painfully tone deaf. It also raised a series of questions for the White House over its handling of the matter. Chief among them being: How long did they know about Porter’s past and why, exactly, were they so eager to defend a credibly accused wife-beater that they petitioned the most senior member of the U.S. Senate to serve as a character witness?

Reached by The Daily Beast on Thursday, after a day of withering questions on just those topics, a White House official said only that, “The White House feels misled by Mr. Porter’s characterization of the [then] impending allegations from his ex-wives.”

The “mischaracterization” the Trump administration is now claiming it was fed by Porter is roughly same characterization apparently given to Team Hatch—that the allegations against Porter were primarily limited to “verbal” disputes and not physical altercations.

What the administration actually knew is just as much a question as when they knew it. According to a CNN report on Thursday night, the White House was aware for months about the accusations against Porter.

But it was only this week that they began to get wind that a story was brewing on the matter. Officials, eager to protect the high-ranking aide, quickly looked for ways to keep the lid on it.

In addition to reaching out to Hatch’s office to warn that it was being pushed by, among others, Lewandowski, the administration prepared statements of their own that gushed about Porter’s character and framed him as a integral part of the administration. When the Daily Mail story was published, the White House quickly recalibrated, holding meetings over how to handle the fallout. By that point, the website The Intercept had published photos of one of Porter’s ex-wives black eye—a product, she explained, of being punched in the face during a vacation.

By Wednesday, Porter had resigned.

At his inaugural press briefing on Thursday, White House deputy press secretary Raj Shah declined to answer specific questions about what West Wing staff knew about the allegations against Porter, or when they knew it. But he conceded that the White House’s reaction to the quickly unfolding scandal had been subpar.

“We all could have done better over the last few days in dealing with this situation,” Shah said, in what was characterized by several other senior Donald Trump aides and outside allies to The Daily Beast as a gross understatement.

Porter’s federal background check was still ongoing, Shah told reporters on Thursday, and while he did not deny that White House chief of staff John Kelly was generally familiar with the allegations, Shah said Kelly had only “fully” learned of those allegations from media reports.

Trump himself, Shah stressed, had no inkling of the allegations until they surfaced in the press on Tuesday.

The president, for his part, was deeply displeased with how his staff had handled this latest self-inflicted crisis. According to two sources with direct knowledge, Trump began commenting in the West Wing about how awful press coverage had been of the Porter scandal and “how terrible” it looked that the White House was forced to back down and—in a jarringly uncharacteristic move from Trump-world—ultimately cop to a grave error.