WASHINGTON (Reuters) - President Donald Trump’s firing of FBI Director James Comey followed a turbulent year for Comey in which he became embroiled in controversy over his handling of investigations involving both Trump and former Democratic presidential candidate Hillary Clinton. Here is a timeline of the events that preceded Comey’s firing and Trump’s reaction to them. Comey announced he had recommended no criminal charges filed against Democratic presidential candidate Hillary Clinton for her handling of classified information while she was secretary of state but called her “extremely careless” for using a private email server. Trump responded to the news by tweeting that Comey’s decision was an example of a “rigged system” in the United States. “Very very unfair! As usual, bad judgment,” he tweeted. Less than two weeks before the Nov. 8 presidential election, Comey announced in a letter to Congress that the FBI had learned of the existence of emails that appeared to pertain to the Clinton investigation and they would be reviewed whether they contained classified information.  The abrupt decision to renew the investigation upset Democrats who believed the announcement would have an impact on voting trends on Election Day and harm Clinton’s chances of victory. Campaigning in Michigan, Trump exulted at the news of a reopened probe into actions surrounding an opponent he had dubbed “Crooked Hillary.” “That was so bad what happened originally, and it took guts for Director Comey to make the move that he made in light of the kind of opposition he had where they’re trying to protect her from criminal prosecution,” Trump said. Two days after his inauguration, Trump was at an event in the White House and saw Comey in the audience. He called out to him and Comey strode up and they warmly shook hands and briefly embraced.   “He’s become more famous than me,” Trump said with a chuckle. Trump fired his national security adviser, Michael Flynn, after only 24 days in office after it was disclosed that Flynn had misled Vice President Mike Pence about the contacts he had with Russian ambassador to the United States Sergei Kislyak. Comey, in testimony before the House Intelligence Committee, said the FBI had been investigating possible coordination between the Trump presidential campaign and Russia. Clinton told a Women for Women event in New York that the Comey announcement threw the election for Trump. “If the election had been on Oct. 27, I would be your president,” she said. Trump responded with a late-night series of tweets. “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!” Trump tweeted. White House spokesman Sean Spicer was asked about Trump’s tweet about Comey. “The president has confidence in the director,” Spicer told reporters. May 4, 2017 Comey, in testimony to the Senate Judiciary Committee, said it made him “mildly nauseous” to think his announcement of the reopening of an investigation into Clinton’s emails affected the 2016 presidential election, but he had no regrets and would make the same decision again.  In four hours of testimony Comey gave an impassioned defense of his decision to reopen the Clinton probe. May 8, 2017 ProPublica reported possible inaccuracies about Comey’s statements about Clinton aide Huma Abedin. It said the FBI was said to be preparing to correct the record but that the plan appeared to be on hold with the bureau undecided about what to do. MIDAFTERNOON, May 9, 2017 At his afternoon daily briefing White House spokesman Sean Spicer was asked whether Trump still had confidence in Comey. Unlike his statement from a week earlier when he said Trump had confidence in Comey, Spicer equivocated. “I don’t want to start speaking on behalf of the president without speaking to him first,” Spicer said. ABOUT 5:30 PM, May 9, 2017 In a brief appearance in the White House press room, Spicer announced Trump had accepted the recommendation of Attorney General Jeff Sessions and deputy Attorney General Rod Rosenstein to fire Comey. A letter provided to the news media from Rosenstein cited Comey’s handling of the Clinton probe. The New York Times reported Comey got the news while in Los Angeles where he had been addressing FBI employees there. When a TV in the background flashed the news, Comey at first thought it was a prank, but then got word he had been fired. At the FBI headquarters in Washington, Trump personal aide Keith Schiller was seen leaving the building. A White House official said he had delivered Trump’s letter announcing Comey’s dismissal. 