A federal judge imposed a partial gag order against former President Donald Trump, blocking him from making statements targeting Special Counsel Jack Smith, his staff, witnesses and court personnel.

U.S. District Judge Tanya Chutkan of the District of Columbia, who is presiding over Smith’s case against the former president for charges related to the Jan. 6, 2021, Capitol riot, made the decision during a court hearing on Monday.

Chutkan said Monday that the former president is able to criticize the Justice Department in general terms and has the right to post his view that the case against him is politically motivated. However, the judge said Trump cannot post attacks against prosecutors or court staff.

A court sketch depicts former President Donald Trump’s legal representation in court before U.S. District Judge Tanya Chutkan

A court sketch depicts former President Donald Trump’s legal representation appearing before U.S. District Judge Tanya Chutkan in Washington D.C. on Aug. 11, 2023. (William J. Hennessy Jr.)

TRUMP PLEADS 'NOT GUILTY' TO CHARGES STEMMING FROM SPECIAL COUNSEL'S JAN. 6 PROBE

"No other criminal defendant would be allowed to do so, and I'm not going to allow it in this case," Chutkan said, adding that, if necessary, she would impose sanctions if Trump violates the partial gag order.

The former president was not in court in Washington, D.C., on Monday. He was not required to appear. Trump, instead, campaigned in Iowa. 

"Today’s decision is an absolute abomination and another partisan knife stuck in the heart of our Democracy by Crooked Joe Biden, who was granted the right to muzzle his political opponent, the leading candidate for the Presidency in 2024, and the most popular political leader in America, President Donald J. Trump," a Trump spokesperson told Fox News Digital.

JUDGE IMPOSES PARTIAL GAG ORDER IN TRUMP ORG TRIAL, BLOCKING PARTIES FROM VERBAL ATTACKS AGAINST COURT STAFF

"President Trump will continue to fight for our Constitution, the American people’s right to support him, and to keep our country free of the chains of weaponized and targeted law enforcement," the spokesperson added.

Former President Donald J. Trump and Judge Tanya Chutkan in a split image

Former President Donald J. Trump and Judge Tanya Chutkan. (AP Photo/Evan Vucci, File/United States Courts)

The move comes after the judge presiding over the New York Trump Organization trial imposed a partial gag order to prevent all parties from engaging in any verbal attacks against court staff after Trump criticized a member of the judge’s office on social media.

Judge Arthur Engoron earlier this month issued an order that he said applies to both the defense and New York Attorney General Letitia James' team. The gag order only applies to verbal attacks on staff.

Donald Trump and Jack Smith split

Former President Donald Trump, left, and Special Counsel Jack Smith. (Getty Images)

Trump pleaded not guilty in federal court to all four federal charges stemming from Smith's investigation into 2020 election interference and the Capitol riot on Jan. 6, 2021. 

CLICK HERE TO GET THE FOX NEWS APP 

Trump, the current 2024 GOP front-runner, is charged with conspiracy to defraud the United States, conspiracy to obstruct an official proceeding, obstruction of and attempt to obstruct an official proceeding and conspiracy against rights. 

Fox News' Lauren Shank and The Associated Press contributed to this report.