In a now infamous private dinner on January 27, President Donald Trump allegedly told James Comey, the FBI director at the time, “I need loyalty, I expect loyalty.” Comey, by his own account, tried to wriggle out of the uncomfortable situation by promising “honest loyalty,” but not every government official has so successfully resisted the mob boss’ expectations. Michael Flynn, the former national security advisor, was one of Trump’s prime loyalists—and Trump repaid Flynn in kind, depending him well after anyone thought it politically sensible. But now their bond has been broken, as Flynn has flipped.

Flynn on Friday pleaded guilty to lying to the FBI about his conversations with Russian Ambassador Sergey Kislyak and reportedly has offered “full cooperation” with Robert Mueller’s investigation of the Trump campaign’s ties with Russia. He’s even willing to testify against his former boss, specifically that the president “directed him to make contact with the Russians, initially as a way to work together to fight ISIS in Syria,” according to ABC. “A close confidant told ABC News that Flynn felt abandoned by Trump in recent weeks, and told friends about the decision to make the plea deal within the last 24 hours as he grew increasingly concerned about crippling legal costs he would face if he continued to contest the charges.”

The severity of Flynn’s betrayal can only be appreciated by recalling how tight the president and his erstwhile adviser once were. Less than two days after Trump won the presidency, outgoing President Barack Obama warned Trump not to appoint Flynn. (Obama had fired Flynn as head of the Defense Intelligence Agency in 2014 for mismanagement.) Trump ignored Obama’s counsel, and offered Flynn the position of national security advisor; Flynn accepted. On January 4, Flynn revealed to the Trump transition team that the FBI was investigating for covertly lobbying for Turkey; Flynn was not fired. Three weeks later, on January 26, White House counsel Don McGahn was informed by then-acting Attorney General Sally Yates that Flynn was vulnerable to blackmail by the Russian government because he made false claims about his contact with them. Again, Flynn was not fired.

Flynn was eventually forced to resign, on February 13, after the story of his contacts with Kislyak, the Russian ambassador, were leaked. The next day, Trump met with Comey and told the FBI director, “I hope you can see your way clear to letting this go, to letting Flynn go. He is a good guy. I hope you can let this go.” The following day, during a press conference, Trump praised Flynn, saying, “General Flynn is a wonderful man. I think he’s been treated very, very unfairly by the media—as I call it, the fake media, in many cases. And I think it’s really a sad thing that he was treated so badly.” On March 31, Trump tweeted out support for the idea of granting Flynn immunity in exchange for testimony. Trump also repeatedly asked White House lawyers if he could contact Flynn. Trump was consistently told that it would be inappropriate, but in April he called Flynn anyway and told him, “Stay strong.”

The pattern is clear: Trump acted as Flynn’s protector, possibly in exchange for the expectation that Flynn would remain loyal by not testifying against the president.

If Flynn has violated this allegiance, it’s likely he did so out of a higher loyalty to family. The general’s son, Michael Flynn Jr., has also been entangled in Mueller’s investigation. In a statement today, the elder Flynn stated, “My guilty plea and agreement to cooperate with the Special Counsel’s Office reflect a decision I made in the best interests of my family and of our country.” The phrase “best interests of my family” is being interpreted as an allusion to the fate of his son.

Because nepotism pervades his administration, Trump may eventually face a similar dilemma. After all, Donald Trump Jr. and Jared Kushner, the president’s son-in-law, are both caught in the thicket of the Russia investigation. By targeting Trump Jr. and Kushner, Mueller has powerful leverage he can use against the president.

Surviving White House coverups and scandals requires loyalists, ideally those motivated by ideology. Richard Nixon’s misfortune was to be surrounded by opportunists willing to sell out the president rather than go to jail (the fanatical G. Gordon Liddy being the exception). Ronald Reagan avoided the full brunt of Iran-Contra in part because of the loyalty of his underlings. During the George W. Bush administration, Scooter Libby was willing to take the fall rather than incriminate Vice President Dick Cheney in the outing of CIA agent Valerie Plame.

In this sense, as in so many others, Trump most resembles Nixon. Trump and Flynn had ideological ties, believing in an alliance with Russia to strengthen a civilizational war against Islam. But Flynn’s loyalty to this alt-right foreign policy proved less powerful than his own self-interest and desire to protect his son. Trump is by no means undone by today’s news, but he’s likely to find that Flynn isn’t the only adviser who can’t live up his expectations of loyalty.