A Utah judge has been suspended for six months without pay for making controversial comments about President Trump online and in court.

"Welcome to the beginning of the fascist takeover," Judge Michael Kwan wrote online. "We need to be diligent in questioning Congressional Republicans if they are going to be the American Reichstag."

Trump has a notoriously tumultuous relationship with US judges and has publically blasted some that have ruled against him.

Visit Business Insider's homepage for more stories.

A Utah judge has been suspended for six months without pay for making controversial comments about President Trump online and in court.

According to the court ruling, Kwan made a series of comments bashing the President on social media in both the run-up and the years after the 2016 Presidential election.

Kwan said that his comments before the election were largely "social commentary or humor" and were not "expressly" critical of Trump. He said he was more "direct" and "critical" after the election but that these comments should be protected under the first amendment as they were synonymous with his views on issues such as racism and civil rights.

The court ruling listed examples of his Trump bashings on social media.

In 2016, after Trump was elected, he wrote: "Think I'll go to the shelter to adopt a cat before the President-Elect grabs them all." Kwan appears to be referencing an Access Hollywood tape that surfaced before the election and in which Trump was heard bragging about "grabbing" women by the genitals.

In 2017, Kwan wrote: "Welcome to the beginning of the fascist takeover. We need to be diligent in questioning Congressional Republicans if they are going to be the American Reichstag."

The Utah Supreme Court ruled Thursday that he had violated the code of conduct several times.

In a statement sent to Business Insider, Kwan's attorney, Gregory G. Skordas of Skordas Caston & Hyde, said that the team was "disappointed" with the ruling but not necessarily surprised.

"We had hoped that the Utah Supreme Court would be more sympathetic to his situation and comments. He is the son of Chinese Immigrants who fled China after being persecuted there," Skordas said. "He understandably has strong feelings about issues related to immigration and persecution. We had tried, unsuccessfully to argue that his internet posts and in-court comments were protected speech based on his stance on immigration policies and not comments about a particular candidate."

Trump has had a notoriously shaky relationship with US judges and has publically blasted some that have ruled against him.

One federal judge recently called the Trump administration a "great assault" on the US judiciary.