Donald Trump has often attacked the 9th Circuit Court, which has more judges appointed by Democrats

A U.S. appeals court handed President Donald Trump a defeat on Friday when it refused to allow his order barring asylum for immigrants who enter the country illegally to take effect, while a court challenge proceeds.

Trump cited an overwhelmed immigration system for his recent proclamation that officials will only process asylum claims for migrants who present themselves at an official entry point. Civil rights groups sued, arguing that Trump's Nov. 9 order violated administrative and immigration law.

A San Francisco judge last month issued a temporary restraining order against the asylum rules, which applied nationwide. The U.S. Department of Justice called that ruling "absurd" and asked the 9th U.S. Circuit Court of Appeals to allow Trump's policy to take effect while the lawsuits proceed.

Trump has often attacked the 9th Circuit, which has more judges appointed by Democrat presidents than Republicans, accusing it of frustrating his policy initiatives, particularly on immigration.

The split 9th Circuit ruling on Friday was written by Judge Jay Bybee, an appointee of Republican president George W. Bush. Bybee agreed with the lower court that Trump's policy likely exceeds his authority.

"The Executive has attempted an end-run around Congress," Bybee wrote.

A Justice Department spokesman declined immediate comment, but reiterated a previous statement that the policy is a "well reasoned exercise" of Trump's authority.

9th Circuit Judge Andrew Hurwitz, an appointee of Democrat President Barack Obama, joined Bybee's ruling while Edward Leavy, an appointee of Republican President Ronald Reagan, dissented.