Christopher Krebs, the director of the Cybersecurity and Infrastructure Security Agency, had expected to be fired, a source with knowledge of the situation told ABC News last week.
The president criticized a statement given by Krebs' agency saying there was no evidence of fraud during the 2020 election. In announcing Krebs' firing, Trump repeated previously debunked claims of fraud in the election.
"The recent statement by Chris Krebs on the security of the 2020 Election was highly inaccurate, in that there were massive improprieties and fraud -- including dead people voting, Poll Watchers not allowed into polling locations, 'glitches' in the voting machines which changed votes from Trump to Biden, late voting, and many more," Trump wrote without evidence on Twitter. "Therefore, effective immediately, Chris Krebs has been terminated as Director of the Cybersecurity and Infrastructure Security Agency."
The tweet was immediately slapped with a warning from Twitter that the claims were disputed.
On Twitter, Krebs wrote following his firing, "Honored to serve. We did it right."
Krebs was the first director of the CISA and had served since November 2018.
The CISA said in a statement last Thursday, "There is no evidence that any voting system deleted or lost votes, changed votes, or was in any way compromised."
CISA is responsible for securing the 2020 elections and has been exposing what it calls election-related "rumors" on its website -- including those spread by Trump and his allies.
CISA's "Rumor Control" site has debunked everything from software glitches in voting software to votes being cast by dead people.
"While we know there are many unfounded claims and opportunities for misinformation about the process of our elections, we can assure you we have the utmost confidence in the security and integrity of our elections, and you should too," the members of Election Infrastructure Government Coordinating Council Executive Committee said. "When you have questions, turn to elections officials as trusted voices as they administer elections."
The statement goes on to say that "The November 3rd election was the most secure in American history."
Sen. Angus King, I-Maine, who sits on the Senate Intelligence Committee, tweeted Trump is "inflicting severe damage" on Americans by terminating Krebs.
"If there's any silver lining in this unjust decision, it's this: I hope that President-elect Biden will recognize Chris's contribution, and consult with him as the Biden administration charts the future of this critically important agency," King wrote.
Others echoed the outrage at Krebs' firing and added voices of support to the former director.
"Chris Krebs should be commended for his service in protecting our elections, not fired for telling the truth," Joe Biden's campaign spokesperson Michael Gwin said. "Bipartisan election officials in the administration itself -- and around the country -- have made clear that Donald Trump's claims of widespread voter fraud are categorically false and Trump's embarrassing refusal to accept that reality lays bare how baseless and desperate his flailing is."
Nebraska Sen. Ben Sasse, a Republican, said the firing was unearned.
"Chris Krebs did a really good job -- as state election officials all across the nation will tell you -- and he obviously should not be fired," Sasse said in a statement. "I'm particularly grateful for the work he did on the Cyber Solarium Commission to help the nation prepare for the future of war."
"Chris Krebs did a tremendous job at the helm of CISA, as its first director," said Kiersten Todt, a former Obama Cybersecurity Commission member, in a statement. "People forget that the reputation of DHS was not too strong four years ago. Krebs, through his leadership at CISA, gave credibility to the work of this agency, and was committed for four years to working toward a safe and secure election in 2020."
The first news of Krebs' expected firing last week were reported by Reuters.
Two other CISA staffers, Bryan Ware, assistant director for cybersecurity for CISA, and Valerie Boyd, assistant secretary for international affairs at U.S. Department of Homeland Security, were asked to resign Thursday, a separate source familiar with the matter also told ABC News, but their emails appeared active as of Friday. Neither official responded to an ABC News request for comment.
Last week, CISA did not returned a request for comment, and the White House declined to respond when asked whether Krebs would be fired, whether Ware and Boyd were asked to resign, or whether the White House was involved.
Last Thursday, following news reports he expected to be fired, Krebs took to Twitter to personally assure Americans the election was secure.
"America, we have confidence in the security of your vote, you should, too," he tweeted.