(RNN) - An FBI agent who was the subject of a congressional hearing has been fired in connection with his texts critical of then-candidate Donald Trump.
Peter Strzok, a 20-year FBI veteran, was relieved of his duties on Friday.
The firing, first reported by the Washington Post, was confirmed to CNN by Strzok's lawyer.
The FBI declined to comment.
FBI Deputy Director David L. Bowdich ordered the firing, said Aitan Goelman, who represents Strzok.
"The decision to fire Special Agent Strzok is not only a departure from typical Bureau practice, but also contradicts Director (Christopher) Wray's testimony to Congress and his assurances that the FBI intended to follow its regular process in this and all personnel matters," Goelman said in a statement.
In July, FBI agent Peter Strzok testified in front of the House Judiciary Committee for 10 hours regarding texts he sent using an FBI phone that slammed Trump at the same time he was investigating Hillary Clinton's use of a private server for email.
Strzok took part in the probe into Russian collusion in the 2016 presidential election, but was removed when his texts to an FBI lawyer about Trump surfaced.
When Inspector General Michael Horowitz told special counsel Robert Mueller about the texts last summer, Mueller removed him from the investigation.
Strzok, a deputy assistant director for counterintelligence, was reassigned to a position with human resources.
The lawyer with whom Strzok was texting, Lisa Page, had been part of the special counsel investigation, but no longer works for the FBI. Strzok and Page were having an affair.
Strzok's lawyer described the firing as "deeply troubling" after "multiple rounds of congressional testimony failed to produce a shred of evidence that Special Agent Strzok's personal views ever affected his work."
He called the decision to fire Strzok as "taken in response to political pressure and to punish Special Agent Strzok for political speech protected by the First Amendment, not on a fair and independent examination of the facts."
Goelman said the head of the office that normally handles disciplinary actions determined Strzok should be demoted and suspended for 60 days. Instead, the deputy director fired him.
Strzok tweeted a statement about his firing Monday, saying he was "deeply saddened" by the decision.
"It has been an honor to serve my country and work with the fine men and women of the FBI," he wrote.
Strzok included his lawyer's statement in the tweet, along with a link to a GoFundMe account to cover his legal expenses and lost income.
Strzok is the third high-profile FBI official to lose his job during the Trump administration. The others are ex-FBI Director James Comey and FBI Deputy Director Andrew McCabe.
In a tweet over the weekend, Trump branded them all "clowns and losers" who had hurt "so many of the great men and women of the FBI."
He hailed the firing on Monday as he called the Russian investigation a "witch hunt" yet again.