(Jenny Starrs,Julio Negron/The Washington Post)

Eleven days before the general election, Donald Trump took the stage at a rally in New Hampshire to the cheers of hundreds of rejuvenated supporters.

“I need to open with a very critical breaking news announcement,” Trump said, as the crowd excitedly cut him off with applause, already knowing the news. “The FBI has just sent a letter to Congress informing them that they have discovered new emails pertaining to the former secretary of state Hillary Clinton’s investigation.”

The crowd cheered and began to chant, “Lock her up!”

As soon as that letter landed, Trump’s campaign saw it as a game-changer, a last-minute opportunity that they so direly needed. Clinton and many of her former staffers now point to that letter as the chief reason that she lost the election — a prominent reminder of her shortcomings in the final days of a race that had become much closer than her supporters ever expected.

More than six months later, Trump has decided against locking up his Democratic opponent as he repeatedly promised, and instead fired FBI Director James B. Comey on Tuesday. In doing so, the Republican’s administration pointed to that same Oct. 28 letter as evidence that Comey had mishandled the investigation of Clinton and is not suited for the job.

(Reuters)

The decision — which comes amid an FBI investigation of ties between Trump’s campaign and Russian officials — shows once again that Trump is more than willing to take whatever position or action will serve him well in the moment, even if it contradicts his earlier positions.

“When it comes to strategy, he’s like a day trader on crack,” said John Weaver, a Republican strategist who worked on the GOP presidential campaigns of Sen. John McCain (Ariz.) and Ohio Gov. John Kasich. “There’s no central thread in their messaging. . . . It’s always, ‘What do we have to do to get through this?’ ”

On the campaign trail, Trump routinely took numerous positions on a single issue, allowing his supporters to select whichever one they liked best and blaming the news media for any confusion. Since taking office, Trump has abandoned many of his campaign promises with little explanation.

Trump has wavered on whether Comey was a good guy. In April 2016, Trump said that he’d heard “fantastic things” about Comey. In July, as Comey recommended not charging Clinton, Trump slammed the decision and called the system “rigged.”

Three weeks before the election, Trump accused the FBI of “covering up to protect her.” But 11 days after that, when Comey reopened the investigation, Trump announced that he had “great respect for the FBI for righting this wrong.” At a rally the next day, Trump praised Comey, saying that it “took a lot of guts” to do “the right thing.”

Soon after winning the election, Trump said he respected Comey “a lot.” At a reception two days after the inauguration, Trump warmly hugged Comey and declared him “more famous than me.” At one point, Trump even appeared to blow a kiss to Comey

(Jason Aldag,Sarah Parnass/The Washington Post)

But last week, Trump turned again, tweeting that “FBI Director Comey was the best thing that ever happened to Hillary Clinton in that he gave her a free pass for many bad deeds!” And then came the unexpected firing this week.

Throughout all this, Trump was steadfast in his support of the investigation into Clinton — applauding the steps Comey took and always calling for more. That is a major reason Comey’s firing this week was so jarring.

As CNN’s Anderson Cooper interviewed White House counselor Kellyanne Conway late Tuesday, he asked about the inconsistency.

“Why now are you concerned about the Hillary Clinton email investigation when, as a candidate, Donald Trump was praising it from the campaign trail?” Cooper asked.

“I think you’re looking at the wrong set of facts here,” Conway said. “In other words, you’re going back to the campaign. This man is the president of the United States. He acted decisively today.”

Cooper cut her off: “That makes no sense. He said one thing as a candidate and now he’s concerned as president?

“It makes complete sense,” Conway said.

The White House released the letter that Trump sent to Comey letting him know that he was fired, in which the president provides no detailed reason for the dismissal but notes, “I greatly appreciate you informing me, on three separate occasions, that I am not under investigation.”

The rationale comes in a 2 1/2- page memo from Deputy Attorney General Rod J. Rosenstein, who criticizes Comey’s “handling of the conclusion of the investigation of Secretary Clinton’s emails” and the former director’s “refusal to accept the nearly universal judgment that he was mistaken.”

Rosenstein focuses on two key moments: July 5, when Comey announced at a news conference that Clinton should not face charges and that he also shared “derogatory information” about her, and Oct. 28, when Comey sent the letter to Congress announcing that he had come across new emails that may pertain to the investigation.

When news of that letter broke, Trump was preparing to speak at a rally in Manchester, N.H. He dispatched retired Lt. Gen. Michael Flynn to entertain the crowd while he composed a response.

“I love our New England Patriots — man, are they doing good right now. Wow,” Flynn said. “Shout out for our Patriots. Unbelievable.”

Flynn went on to be the president’s national security adviser for 24 days, after which he was fired for misleading the vice president and other senior officials about his communications with a Russian diplomat.

When Trump finally took the stage, the crowd was pumped up and ready. There was a new energy in the room.

“Hillary Clinton’s corruption is on a scale we have never seen before,” Trump said. “We must not let her take her criminal scheme into the Oval Office. I have great respect for the fact that the FBI and the Department of Justice are now willing to have the courage to right the horrible mistake that they made.”

But by Wednesday, after his firing of Comey had rocked Washington, the new president and his aides were trashing Comey’s job performance as a long-standing problem.

“He wasn’t doing a good job,” Trump told reporters at the White House. “Very simply, he was not doing a good job.”