As Robert Mueller’s siege closes in on Donald Trump, the president has been left to wonder which of his staff and closest allies will, after all, stay loyal. On Tuesday, Michael Cohen completed his operatic turn against his former boss when he stood in federal court and pleaded guilty to eight felonies that included making hush-money payments at Trump’s direction to women Trump allegedly had sex with. The admission effectively made Trump an unindicted co-conspirator in a federal crime.

Cohen’s stunning admission came just days after The New York Times reported that White House counsel Don McGahn provided 30 hours of testimony to Mueller’s investigators. McGahn’s extensive cooperation with Mueller rattled the West Wing to the core at a time when aides were struggling to contain the fallout from former Apprentice star Omarosa Manigault Newman’s scathing White House memoir.

And now Trump’s most powerful media ally next to Fox News has broken with him. According to two sources briefed on the Cohen investigation, prosecutors granted immunity to David Pecker, chairman of The National Enquirer publisher, American Media Inc., and A.M.I.’s chief content officer, Dylan Howard, so they would describe Trump’s involvement in Cohen’s payments to porn star Stormy Daniels and Playboy Playmate Karen McDougal during the 2016 campaign. The Wall Street Journal first reported Pecker’s cooperation on Wednesday night. (Pecker and Howard did not respond to multiple requests for comment. A spokesperson for the Southern District of New York declined to comment.)

Pecker’s apparent decision to corroborate Cohen’s account, and implicate Trump in a federal crime, is another vivid example of how isolated Trump is becoming as the walls close in and his former friends look for ways out. “Holy shit, I thought Pecker would be the last one to turn,” a Trump friend told me when I brought up the news. Trump and Pecker have been close for years. According to the Trump friend, Pecker regularly flew on Trump’s plane from New York to Florida. In July 2013, Trump tweeted that Pecker should become C.E.O. of Time magazine. “He’d make it exciting and win awards!”

During the 2016 campaign, Pecker provided invaluable media support to Trump by regularly attacking his Republican rivals and Hillary Clinton. At times, it seemed like the Enquirer operated as a de-facto arm of the campaign. In October 2015, I reported that Trump aides were a source for an Enquirer article exposing Ben Carson’s malpractice lawsuits (“Bungling Surgeon Ben Carson Left Sponge in Patient’s Brain!”). Pecker denied it at the time. In June, The Washington Post reported that the Enquirer routinely sent stories to Trump to review prior to publication. (The Enquirer denied that as well.) During the transition, rumors circulated that Trump was considering Pecker for a prime ambassadorship. Last summer, Pecker reportedly brought an adviser to Saudi Prince Mohammed bin Salman to meet Trump in the Oval Office to help him expand A.M.I.’s business.

But that was before federal prosecutors investigating Cohen subpoenaed A.M.I. Pecker’s friendship with Trump now seems to be over. According to a source close to A.M.I., Pecker and Trump haven’t spoken in roughly eight months. Howard remains particularly angry at Trump, two people close to Howard told me. “There is no love lost,” one person familiar with Howard’s thinking said. Another person said Howard “hates Trump” and feels “used and abused by him.”