Donald Trump is an incorrigible liar, of course, but this was the week when some of his whoppers finally caught up with him, leaving him in serious legal and political peril. With his former personal attorney Michael Cohen already having testified that Trump ordered him to make payoffs to women, in violation of campaign-finance laws, the revelation that federal prosecutors have corroborating evidence and other witnesses to this scheme, at American Media, Inc., the parent company of the National Enquirer, caused tremors on Capitol Hill. Although it would be premature to start writing Trump’s obituary, as some of his critics are doing, the situation is too serious for the internal reshuffle he announced on Friday evening to make much of a difference. Indeed, the news that Trump has picked Mick Mulvaney, the White House budget director, to replace John Kelly, the departing White House chief of staff, only highlighted the pickle Trump is in.

With at least two sets of federal prosecutors circling around the President, and some Republican insiders expressing doubts about whether he will finish his first term, three prominent candidates for the chief-of-staff job had ruled themselves out of consideration: Nick Ayers, the chief of staff to Vice-President Mike Pence, Chris Christie, the former governor of New Jersey, and Rick Santorum, the former Republican senator. The announcement that Mulvaney would be taking the job on an “acting” basis, which Trump announced in a tweet, was a rushed effort to end a major embarrassment. “Trump grew deeply frustrated at the rejections and the media narrative that no one of stature wanted to be his chief of staff, according to a senior White House official, so he decided suddenly on Friday afternoon to tap Mulvaney,” the Washington Post reported on Friday night.

Of course, that wasn’t the official version of Mulvaney’s appointment. A White House official who briefed reporters on Friday evening said that Trump picked the budget director because they had forged a good working relationship in the past two years and also because of Mulvaney’s prior experience on Capitol Hill, where Trump’s fate could be decided. “He got picked because the president liked him—they get along,” the official said, according to the Times, adding that there was no time limit to his appointment even though Trump had said he was taking the job on an acting basis.

The rushed nature of the Mulvaney announcement was also evident in the fact that, initially, the White House gave conflicting versions of whether he would be giving up his post as head of the Office of Management and Budget. The White House official who briefed reporters said that Mulvaney’s deputy, Russell Vought, would replace him at the O.M.B. But Sarah Huckabee Sanders, the White House press secretary, subsequently said in a statement, “Mick Mulvaney will not resign from the Office of Management and Budget, but will spend all of his time devoted to his role as the acting Chief of Staff for the President. Russell Vought will handle day to day operations and run OMB.”

Even as Trump finally got someone to replace Kelly, whom he forced out for no clear reason other than he had grown tired of him after seeing him virtually every day for seventeen months, he made clear that he remains sensitive to the impression that nobody of substance is willing to clamber aboard his listing ship. “For the record, there were MANY people who wanted to be the White House Chief of Staff. Mick M will do a GREAT job!” Trump said in a tweet on Friday night. At least on this occasion, unlike earlier in the week, the President didn’t put a number to this outlandish claim. (On Tuesday, he told Reuters, with a straight face, “I have at least ten, twelve—twelve people that want it badly. . . . Great people.”) But anything Trump says on this subject should be greeted with great skepticism: according to numerous accounts, his two first choices for the job turned it down.

Ayers made his decision last weekend just as the White House was preparing to announce his appointment. Christie met with Trump and his wife, Melania, at the White House on Thursday night, and on Friday morning aides described him as a leading contender for the chief-of-staff job, the Post reported. “But Christie called Trump at midday Friday to take his name off the list.” What made him do that? In a public statement, he said that it was ”not the right time for me or my family to undertake this serious assignment.” But the Post, citing someone close to Christie, reported that “a number of current and former White House aides warned Christie that the building was unmanageable and that ‘no one can have success there.’ ”

Mulvaney, a former Tea Party favorite who was one of the architects of the budget-busting Trump-G.O.P. tax bill that Congress passed a year ago, would doubtless contest that claim, but he now has his work cut out for him. In addition to taking on the task of imposing some discipline on Trump, which virtually everyone agrees is impossible, he is inheriting a situation in which Trump’s actions and lies appear to finally be catching up with him. At least in the immediate term, there is very little he will be able to do about that. Looking further forward, he will need to coördinate with Trump, and with senior Republicans on Capitol Hill, to come up with a strategy for dealing with the report from the special counsel, Robert Mueller, whenever it appears, and the onslaught from House Democrats that is about to begin. And he will need to act pretty quickly. Already some Republicans are starting to whisper about the end of the Trump era. In Saturday’s Wall Street Journal, Peggy Noonan recounted a conversation she had with a high-ranking Republican last week. “He knows the president and the White House, and he certainly knows politics,” Noonan wrote. “He speculated aloud on a hunch he’s had that Mr. Trump might not run for re-election. Think of it, he said. Unrelenting bad news is likely coming—final findings from Mr. Mueller, a new and hungry Democratic House, more investigations, little bipartisanship, economic uncertainty. It’s not going to be fun; the outlook for re-election will dim.”

Of course, the opposite argument could also be made—that Cohen’s sentencing and the other news about the investigation by the office of the U.S. Attorney for the Southern District of New York make it more likely that Trump will run in 2020. If he were to leave office, he could face criminal charges for violating campaign-finance laws by arranging payoffs for Karen McDougal, a former Playboy model, and Stormy Daniels, and failing to disclose them as a campaign contributions. The prospect of being arrested and hauled into court would surely provide Trump with an incentive to try for reëlection. Indeed, he might well come to the conclusion that it is the only way to keep his derrière out of jail.