The US inspector general of the intelligence community has issued a withering criticism of Donald Trump who fired him on Friday night, accusing the president of removing him because he “faithfully discharged” his legal obligations in relation to the whistleblower behind the president’s impeachment.

Michael Atkinson is an independent watchdog whose handling of the complaint last September prompted an impeachment inquiry. In a letter to Congress, Trump said Atkinson no longer had his “fullest confidence” and would be removed in 30 days’ time.

Atkinson’s statement in response, released to reporters on Sunday night, upped the stakes. His removal has provoked outcry from Democrats and led to a call for inquiries from some senior Republicans.

Atkinson said he was “disappointed and saddened”. He went on to make a rare and highly pointed rebuttal to Trump, ending in an appeal to future whistleblowers not to be cowed by the president’s actions.

“Please do not allow recent events to silence your voices,” he said.

Trump made it clear on Saturday that Atkinson was dismissed as a reprisal for his handling of the whistleblower complaint.

“I thought he did a terrible job. Absolutely terrible. That man is a disgrace to IGs,” Trump said at the White House briefing on coronavirus.

Atkinson was the first official to alert Congress to the fact that an anonymous whistleblower within the intelligence services had come forward with a complaint relating to Trump’s dealings with the president of Ukraine, Volodymyr Zelenskiy.

The watchdog deemed the complaint “urgent” and “credible” and decided to pass it on to the intelligence committees, as he was legally obliged to do under whistleblower protection laws.

After resistance from within the White House, the complaint initiated a firestorm that led to Trump’s impeachment by the House in December. The president was acquitted by the Senate, voting on party lines, in February.

In the complaint, the whistleblower highlighted a 25 July phone call between Trump and Zelenskiy. The call generated fears Trump was leaning on Ukraine to dig up dirt on his political rival, former vice-president Joe Biden, and his son Hunter Biden.

In his statement, Atkinson insisted he scrupulously abided by the law. He was, he said, under two clear legal obligations: to pass on information from whistleblowers involving classified information to the congressional intelligence committees, and to safeguard the identity of the whistleblower “as a guard against reprisals”.

Stressing the independence of his position, he said: “I have spent my entire 17-year career as a public servant acting without regard to partisan favor or political fear.”

Atkinson also made pointed remarks about the need to keep whistleblowers anonymous. In the wake of the Ukraine complaint, Trump made repeated attempts to identify the whistleblower, going so far as to share a name on Twitter.

At the briefing on Saturday, Trump said: “He’s a fake whistleblower, and frankly someone oughta sue his ass off.”

Atkinson countered: “Those of us who vowed to protect a whistleblower’s right to safely be heard must, to the end, do what we promised to do, no matter how difficult and no matter the personal consequences.”

The statement ended with an impassioned plea to US officials who come across evidence of wrongdoing in government and wonder whether to come forward.

“The American people are counting on you to use authorized channels to bravely speak up – there is no disgrace in doing so. Our government benefits when individuals are encouraged to report suspected fraud, waste and abuse.”

Atkinson’s removal is part of a larger shakeup of the intelligence community under Trump, who has long been skeptical of intelligence officials and information. Atkinson is at least the seventh intelligence official to be fired, ousted or moved aside since last summer.