WASHINGTON, Feb 8 (Xinhua) -- U.S. President Donald Trump on Wednesday accused U.S. courts of being political after his executive order banning immigrants from the Middle East was halted.

"Courts seem to be so political and it would be so great for our justice system if they could read a statement and do what's right," Trump told a gathering of police officers in Washington.

Trump said the court should immediately reinstate the executive order, which he said was signed to promote national security.

"They were talking about things that just had nothing to do with this," he said.

The executive order, which Trump signed on Jan.27, banned the entry of citizens of seven Middle Eastern countries for 90 days, the entry of all immigrants for 120 days and the entry of Syrian immigrants indefinitely.

Major protests broke out in big cities and major airports around the country as many saw the effort as a deviation from long standing immigrants-friendly policies in the United States.

James Robart, a judge at the federal court of the Western District of Washington State, ruled on Friday to put the executive order on freeze nationwide on the ground that the ban was causing states "irreversible damages."

The Department of Justice then made an appeal to the Ninth Circuit Court of Appeal, asking for the retraction of the restraining order. But the request was denied by the Ninth Circuit Court.

Trump has previously attacked Robart for blocking his executive order, tweeting "the opinion of this so-called judge, which essentially takes law-enforcement away from our country, is rediculous and will be overturned!"

The criticism shattered a U.S. political tradition where members of the executive branch and legislative branch refrained from commenting on judicial decisions.

"I think it's best not to single out judges for criticism," Senate Majority Leader Mitch McConnell said in response to Trump's tweet.