Washington (CNN) A federal appeals court temporarily allowed the Trump administration to continue sending migrants to Mexico to wait for their immigration hearings in the US, hours after issuing a ruling that ended the policy.

The ruling by the Ninth Circuit Court of Appeals on Friday applied across the southern border and stripped the administration of one of its key asylum policies, which went into effect in January 2019. The Ninth Circuit also issued a separate ruling that upheld a lower court's block on an administration policy denying asylum to those who crossed the southern border illegally.

The so-called "remain in Mexico" program required migrants, many of whom are from Central America, to stay in Mexico until their respective court dates in the US. On Thursday, acting Customs and Border Protection Commissioner Mark Morgan said 59,000 people have been enrolled in the program, formally known as the Migrant Protection Protocols program.

Late Friday night, the Ninth Circuit put its ruling on hold after a request by the Trump administration and set a timeline for replies. The policy can continue in the interim.

The Trump administration had asked the court to put a temporary hold on its ruling as soon as Saturday. Lawyers for the Justice Department said they feared "a rush on the southern border by some of the 25,000 or more individuals who are in Mexico under MPP and may now seek immediate entry into this country." The Justice Department alternatively also asked for an administrative stay until March 6 so it could appeal the case to the Supreme Court.

Read More