During the presidential campaign, Donald Trump led his rallies in chants of "Lock her up!" and praised FBI Director James B. Comey's actions investigating Hillary Clinton's use of a private email server that shook voter confidence in the Democratic nominee.
When Comey revealed to Congress 11 days before the election that he was reopening the investigation because the FBI had discovered new emails — a highly controversial move that Clinton says may have cost her the election — Trump lauded the director.
"It took guts for Director Comey to make the move he made in light of the kind of opposition he had where they're trying to protect her from criminal prosecution," Trump told supporters in October. "He's gotta hang tough, because a lot of people want him to do the wrong thing. What he did was the right thing."
On Tuesday he fired Comey, arguing that it was actually the wrong thing.
It is a curious rationale considering Trump's lavish praise for Comey during the heat of the campaign, and one that has left the president open to charges he was just looking for an excuse to jettison an FBI chief who has been investigating whether any of Trump's aides colluded with Russian intelligence during the election.
"If the administration had objections to the way [Comey] handled the Clinton investigation, they had those objections the minute the president got into office," Senate Minority Leader Charles E. Schumer said. "But they didn't fire him then."
On the contrary. Trump warmly embraced Comey at a White House reception right after he was inaugurated in January. Democrats who felt burned by Comey fumed about the exchange over social media.
And when CBS' "60 Minutes" asked Trump about Comey after the election, Trump said, "I respect him a lot."
Not that Trump didn't have grievances. They just weren't any of the issues in the three-page memo drafted by Deputy Atty. Gen. Rod J. Rosenstein and which the White House says Trump relied on when he terminated the FBI chief.
In many cases, Trump had urged Comey to take precisely the kind of actions that Rosenstein's memo now says motivated the director's firing.
The memo hit Comey hard for announcing the conclusions of the FBI investigation at a news conference in July without consent of federal prosecutors, accusing him of inappropriately usurping the attorney general's authority.
"It is not the function of the Director to make such an announcement," Rosenstein wrote. "At most, the Director should have said the FBI completed its investigation and presented its findings to federal prosecutors."
But at that time, with the campaign in full swing, Trump was telling rallies that federal prosecutors in the Obama administration were protecting Clinton, suggesting the FBI needed to wall itself from them. He complained of a "rigged system."
Then-Atty. Gen. Loretta Lynch earlier had been spotted meeting privately on an airplane with former President Bill Clinton. Although both insisted the meeting was a social call only, Trump repeatedly cited their get-together as evidence the fix was in and Lynch's office could not be trusted.
He mocked assertions by Lynch and the former president that they talked about their grandchildren and golf during the 30-minute tarmac meeting.
"So give the grandchildren two minutes," Trump told a rally in July. "Give the golf three and a half minutes. That's a long time to be sitting there twiddling your thumbs. What else are we going to talk about? Let's talk about Hillary!"
At his July 5 news conference, Comey pilloried Hillary Clinton for her email practices and then concluded that her recklessness didn't rise to the level of an indictable crime.
Trump had no problem after Comey accused Clinton and her colleagues of being "extremely careless in their handling of very sensitive, highly classified information." He instead accused Comey of holding back information that proved Clinton's guilt.
But on Tuesday, one of the reasons the White House cited for Comey's firing was that he had violated a long-standing FBI practice of not "gratuitously" releasing derogatory information about a target of an investigation.
Comey's public criticism of Clinton, the Rosenstein memo said, "is a textbook example of what federal prosecutors and agents are taught not to do."
Another thing FBI officials are taught not to do, and which Rosenstein raised in his memo, is announce when it has initiated — or reignited — an investigation.
The memo says Comey's failure to keep quiet about the Clinton emails that the FBI had discovered in October was a grave error. He charged that Comey's explanation — that he spoke up to avoid the appearance of concealing key information — doesn't wash.
"When federal agents and prosecutors quietly open a criminal investigation, we are not concealing anything," Rosenstein wrote. "We are simply following the longstanding policy that we refrain from publicizing non-public information.… [S]ilence is not concealment."
But Trump had nothing but kind words for Comey when he revealed 11 days before the election that the investigation had been relaunched. Trump praised Comey's initiative in the face of what Trump surmised was intense pressure from the Obama administration to keep it under wraps.
"It took a lot of guts," Trump said of Comey. "He brought back his reputation."
Six months ago, much of the Rosenstein memo could have been written by Clinton loyalists. It lays out many of their complaints about how Comey conducted himself during the campaign.
The irony that Trump has fired Comey on grounds that he was, in essence, too aggressive in his pursuit of Clinton is not lost on them.
"Twilight zone," tweeted Clinton campaign manager Robby Mook late Tuesday about the firing. "I was as disappointed and frustrated as anyone at how the email investigation was handled. But this terrifies me."
Times staff writer Noah Bierman contributed to this report.
Follow me: @evanhalper