Michael Flynn, President Donald Trump’s national security adviser, has resigned just weeks after the new president took office. The resignation came after questions grew over whether Flynn had deliberately lied to Vice President Mike Pence and the FBI over phone calls with a Russian envoy on December 29, which may have violated federal law.

On social media, a few Trump critics were quick to point out the hypocrisy that led Flynn to this moment. During the July 2016 Republican National Convention, in which Trump accepted his nomination to run for president, Flynn joined crowds in chanting, “Lock her up!” in reference to Hillary Clinton, who had been accused of mishandling classified information by using a private email server. As the crowd chanted, Flynn said, “If I did a tenth of what she did, I would be in jail today.” (The FBI concluded that “no reasonable prosecutor” would bring a case against Clinton over the email issue.)

Flynn, meanwhile, was forced to resign a few weeks after he and Trump took office. According to US officials who spoke to the Washington Post and New York Times, Flynn had reportedly spoken to the Russian envoy about sanctions imposed on Russia and hinted that Trump would be willing to lift them. That may have put Flynn in violation of the Logan Act, an obscure law that prohibits people outside the executive branch from making foreign policy on behalf of the US administration. But no one has ever been prosecuted under the law, making a prosecution’s future uncertain.

The problems arose when it later came out that Flynn had lied to not only Pence about the phone call — but also the FBI. That could put him in the path of more serious criminal charges for lying to law enforcement investigators.

In his resignation letter, Flynn said that during “the fast pace of events” of the Trump transition period, he “inadvertently briefed the Vice President Elect and others with incomplete information regarding my phone calls with the Russian Ambassador.” It’s hard to imagine him accepting a similar excuse if Clinton had done something similar.

Watch: How Donald Trump thinks about foreign policy