The surprise firing of James Comey was triggered by the ousted FBI director's recent comments on why he chose not to seek the prosecution of Hillary Clinton for using an unsecure email server, according to White House and Trump administration officials.

President Trump was angered by Comey's assertion that Clinton had no criminal intent when she mishandled highly classified information on her private server, said officials familiar with the president's thinking.

The Comey firing took center stage at a hearing of the Senate Intelligence Committee Thursday where the acting FBI director fielded questions from Democrats who suggested the dismissal was aimed at hampering an ongoing FBI counterintelligence probe into whether Russian intelligence secretly cooperated with the Trump presidential campaign last year.

In the nine months since the Russia-Trump campaign investigation has been underway, no evidence of criminal wrongdoing has been disclosed, either by officials or in unofficial leaks.

A White House official said the fact that no evidence has emerged from the probe shows there is no basis for Democrats' allegations of covert collusion between Moscow and the Trump campaign.

Acting FBI Director Andrew McCabe denied during Senate testimony that the FBI had asked for additional resources for the Russia probe, contradicting a widely quoted New York Times report Thursday.

"I strongly believe that the Russian investigation is adequately resourced," McCabe said, adding that the investigation is continuing "vigorously."

The Times, quoting unnamed congressional officials, reported that Comey had asked the Justice Department for more prosecutors days before his firing. The Justice Department also denied the story.

Trump told NBC the FBI was in "virtual turmoil" as a result of Comey's mishandling of the Clinton investigation into the use of a private email server that compromised highly classified information.

"I was going to fire Comey; there's no good time to do it, by the way," Trump said.

"He's a showboat. He's a grandstander. The FBI has been in turmoil. You know that. I know that. Everybody knows that. You take a look at the FBI a year ago. It was in virtual turmoil less than a year ago. It hasn't recovered from that," he said.

The president said the recommendation to dismiss the FBI chief was outlined in a memo from Deputy Attorney General Rod Rosenstein and was not the sole reason he made the decision.

Rosenstein "made a recommendation, but regardless of recommendation, I was going to fire Comey," he said.

White House Deputy Press Secretary Sarah Sanders confirmed the Senate testimony last week was a trigger for the dismissal. She said the president had "lost confidence" in Comey over the past several months.

"After watching Director Comey's testimony last Wednesday, the president was strongly inclined to remove him," she said.

During the Senate hearing, Sen. Mark Warner (D., Va.) called the firing "a shocking development."

"For many people, including myself, it's hard to avoid the conclusion that the president's decision to remove Director Comey was related to this [Russia] investigation and that is truly unacceptable," Warner said.

Added another Democrat, Sen. Ron Wyden (D., Ore.): "Gentlemen, it's fair to say I disagreed with Director Comey as much as anyone in this room but the timing of this firing is wrong to anyone with a semblance of ethics."

McCabe declined to comment when asked if Comey had informed Trump three times that he was not under investigation, as Trump stated in his dismissal letter to Comey.

Trump said in the NBC interview that he was told by Comey he was not under investigation during a dinner meeting and in two telephone calls.

"I think he asked for the dinner, and he wanted to stay on as the FBI head, and I said ‘I'll consider it, we'll see what happens,'" Trump said. "But we had a very nice dinner, and at that time he told me, ‘You are not under investigation.'"

During May 3 Senate testimony, Comey said one reason he recommended against a Justice Department prosecution of Clinton was that she lacked criminal "intent" when setting up the private email server that was used to transmit some classified information.

"Federal law is clear regarding classified materials: intent is not relevant [to mishandling classified information]," the White House official said.

The probe into Clinton's emails revealed that "top secret" information, including some of the nation's most closely guarded information held in what are called Special Access Programs, was transmitted on her private email server. The information included secrets on North Korea's nuclear programs and how the U.S. government targets terrorists for drone strikes.

The president was said to be upset that Comey had granted concessions to witnesses in the email probe that undermined its integrity, the officials said.

For example, two key witnesses, Clinton aides Cheryl Mills and Heather Samuelson, were granted immunity from prosecution. The immunity deals limited searches for evidence and required the FBI to destroy their laptop computers after the computers were searched, potentially eliminating evidence.

Also, FBI questioning of Clinton took place without her being placed under oath and without being recorded, preventing a transcript of the interview from being produced.

Lenient handling of witnesses and evidence in the case was a key factor leading Trump to fire Comey, the officials said.

FBI agents investigating the Clinton email server were upset by Comey's intervention in the probe. "They were seething with anger [at Comey]," said an administration source with direct knowledge of some case agents' views.

In addition to Comey's comments on Clinton's intentions, "the sheer number of immunities granted during the case and destruction of laptops made it clear that his position was untenable," said the White House official. "Add the low morale inside the FBI and the firing was unavoidable."

McCabe, the acting FBI chief, challenged reports that FBI agents were angry at Comey. He said the "vast majority" of FBI employees felt positively toward the director.

In a letter to FBI employees sent Thursday, Comey said he has "long believed that a president can fire an FBI Director for any reason, or for no reason at all."

"I'm not going to spend time on the decision or the way it was executed," he stated. "I hope you won't either. It is done, and I will be fine, although I will miss you and the mission deeply."

"I have said to you before that, in times of turbulence, the American people should see the FBI as a rock of competence, honesty, and independence," he added.

Comey also came under fire from some FBI agents for not pursuing Clinton's motive in setting up the private email server in 2009, apparently to avoid federal records guidelines used to preserve official communications.

"FBI agents were seething with resentment at Comey's meddling" in the Clinton email investigation, the administration source said. "They were up in arms."

Comey told the Senate Judiciary Committee on May 3 that he was "nauseous" at the thought his public discussion of the probe may have impacted the 2016 election.

In early July, Comey announced he was recommending against prosecuting Clinton while issuing harsh criticism of her mishandling of classified information. He then reopened the probe 11 days before the election.

On Oct. 28, Comey sent a letter to Congress saying newly discovered emails relevant to the case had been found on the computer of Anthony Weiner, husband of Clinton aide Huma Abedin.

"We did not find anything that changes our view of her intent," Comey said of the October emails.

Later in the hearing, Comey stated regarding Abedin that "we didn't have any indication that she had a sense that what she was doing was in violation of the law. Couldn't prove any sort of criminal intent."

"Really, the central problem we have with the whole email investigation was proving that the secretary and others knew that they were doing, that they were communicating about classified information in a way that they shouldn't be and proving that they had some sense of their doing something unlawful. That was our burden and we weren't able to meet it," Comey testified.

Federal law regarding the handling of classified information makes it a crime to knowingly and willfully communicate, furnish, or transmit classified information.

The FBI concluded that hackers from Russia tried to break in to Clinton's private email server, although the cyber intrusions did not appear to be successful.

Intelligence officials have said Clinton's use of the private email server almost certainly means that sophisticated foreign electronic intelligence services gained access to the emails.

Comey disclosed in March that the FBI was investigating any Russian ties to the Trump campaign.

"The FBI, as part of our counterintelligence mission, is investigating the Russian government's efforts to interfere in the 2016 presidential election and that includes investigating the nature of any links between individuals associated with the Trump campaign and the Russian government and whether there was any coordination between the campaign and Russia's efforts," Comey said.