A federal judge has indefinitely stopped the Trump administration from firing federal workers amid the ongoing government shutdown.

U.S. District Judge Susan Illston granted a preliminary injunction that banned the layoffs while a lawsuit filed by the federal employee unions challenging the layoffs is pending.

During a Tuesday hearing in San Francisco, Illston banned almost 40 federal agencies from conducting layoffs.

RELATED: Hundreds of CDC workers reinstated after being fired amid government shutdown

Federal employee unions, including the American Federation of Government Employees, filed a lawsuit against the Trump administration contending that the layoffs are unlawful and enforcing layoffs and that the current funding lapse does not justify huge job cuts because many federa

See Full Page