The FBI has sacked a long-serving agent who worked on special counsel Robert Mueller’s Russian collusion investigation after he sent text messages to a colleague which criticised US president Donald Trump.

Former agent Peter Strzok was removed from Mr Mueller’s team a year ago after the text messages were discovered.

The FBI had been reviewing his employment. Mr Strzok’s lawyer, Aitan Goelman, said he was sacked late on Friday by FBI deputy director David Bowdich.

Mr Goelman criticised the move, saying his client had been removed because of political pressure and “to punish Special Agent Strzok for political speech protected by the First Amendment”.

He said the sacking “should be deeply troubling to all Americans”.

Mr Trump has repeatedly criticised Mr Strzok on Twitter.

Mr Goelman said that the FBI had overruled the FBI’s Office of Professional Responsibility, which he said had determined that a 60-day suspension and demotion from supervisory duties was “the appropriate punishment”.

Mr Strzok vigorously defended himself at a combative hearing at US congress in July, speaking publicly for the first time since the texts were revealed.

He insisted that the texts – including ones in which he called Mr Trump a “disaster” and said “We’ll stop” a Trump candidacy – did not reflect political bias and had not affected his investigations.

Mr Trump is questioning whether Mr Mueller’s investigation will be dropped as a result of the sacking.

The president tweeted that “the list of bad players in the FBI & DOJ gets longer & longer,” adding that the investigation is a “total hoax”.

Mr Strzok was also a lead investigator on the probe into Democrat Hillary Clinton’s email sever in 2016.

Republicans were livid at the hearing, which several times devolved into a partisan shouting match. Democrats accused Republicans of trying to divert attention from Mr Mueller’s investigation and Mr Trump’s ties to Russia by excessively focusing on Mr Strzok.

Mr Trump has said the text messages showed that Mr Mueller’s investigation is a hoax.

House Republicans cheered the news of Mr Strzok’s firing, with House Majority Leader Kevin McCarthy saying on Twitter that it was “long overdue”.