The order from U.S. District Judge Loren L. AliKhan came minutes before the funding freeze was scheduled to go into effect.