A federal judge on Wednesday publicly denounced Donald Trump over his attacks on the judiciary, declaring that the president has undermined confidence in the legal system by impugning members of the federal bench and disparaging decisions against his administration.

Senior Judge Paul Friedman of the U.S. District Court for the District of Columbia, delivering the annual Judge Thomas A. Flannery Lecture in Washington, highlighted several examples from the past two years in which Trump assailed judges for ruling against his administration.