WASHINGTON — Attorney General William P. Barr said on Thursday that President Trump was right to fire the inspector general who disclosed the whistle-blower complaint about Mr. Trump’s dealings with Ukraine and that the president’s political enemies could face criminal prosecution.

In coming to the president’s defense, Mr. Barr also praised Mr. Trump’s response to the coronavirus pandemic, which has touched nearly every aspect of the economy and is projected to kill as many as 100,000 Americans.

Mr. Barr’s statements, made in an interview with the Fox News host Laura Ingraham, show that he remains one of Mr. Trump’s staunchest allies despite a feud that erupted between the two men this year over the president’s attacks on the Justice Department.

Late last Friday, Mr. Trump told Congress that he was firing Michael K. Atkinson, the intelligence community inspector general who disclosed the whistle-blower complaint that brought to light the president’s actions toward Ukraine and prompted impeachment proceedings last fall.