U.S. President Donald Trump attends the National Prayer Breakfast in Washington, U.S., February 2, 2017
President Donald Trump attends the National Prayer Breakfast in Washington,  February 2, 2017 Reuters Pics

A top judge in China has called US President Donald Trump a public enemy against the rule of law after Trump questioned the US judiciary's integrity and independence over the weekend.

"The president who would curse a judge and the thug who would kill a judge are both public enemies of the rule of law," wrote Supreme People's Court Judge He Fan in a blog post published Sunday (5 February) according to the Associated Press.

Fan wrote in response to a series of tweets that Trump sent out over the weekend questioning the integrity of federal judge James Robart, a mainstream Republican appointed by President George W Bush.

On Friday (3 January) Robart temporarily blocked the president's travel and immigration executive order banning people and refugees with valid visas and residency cards from from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen from entering the US for 90 days.

Trump later took to Twitter, stating: "The opinion of this so-called judge, which essentially takes law enforcement away from our country, is ridiculous and will be overturned!" The president warned that the judge was putting the US in "peril", and that if a terrorist attack were to happen to "blame him and court system".

The US government is made up of three equal, yet different, branches, including the legislative, represented by Congress; executive, represented by the president; and the judicial, or US court system.

Fan wrote that because of America's separation of powers, a president who is dealt a judicial defeat should bear the loss silently rather than lash out at a judge.

"Who cares that you control the armed forces and have nuclear weapons at your disposal. Your dignity has been swept away and you are no different than a scoundrel," he wrote.

China's ruling Communist Party has used the first weeks of the Trump administration to tout the country's authoritarian, one-party system as preferable to democracy to secure economic growth and political stability.