A federal judge on Tuesday ruled that government employees who have been deemed essential can't refuse to work without pay during the partial shutdown.

U.S. District Judge Richard Leon denied a temporary restraining order that would have either forced the government pay workers or allow them the option to refuse to work while not receiving pay. Leon ruled that such an order would incite “chaos” and was against the public interest since it’s unclear how many workers would choose to still go to work without pay. He also said it could put the safety of the public in jeopardy.

The ruling comes after the judge consolidated three cases making similar claims on the grounds that the government was violating the Constitution in forcing employees to work without pay. The three lawsuits come from the National Treasury Employees Union, National Air Traffic Controllers Association, and a group of five federal workers.

The plaintiffs in the case argued that being forced to work without pay is against the 13th Amendment, which abolished slavery. They also asked that the judge prevent them from being retaliated against for not showing up to work and asked them to allow workers the ability to find other means of income while they are not being paid.

TRUMP SUGGESTS PELOSI SHOULD STOP GETTING A PAYCHECK AMID SHUTDOWN

The National Treasury Employees Union also argued that by promising workers backpay, the Trump administration was violating the Appropriations Clause since they’re promising to spend funds that haven’t been appropriated.

The judge sympathized with the plaintiffs, but ultimately said he had to weigh the interests of the public as well as federal workers. He added that the judiciary branch is dealing with its own hardships as a result of the shutdown but said he did not want the courts to be a factor in the ongoing debate about funding the government.

“The judiciary is not another source of leverage,” Leon said.

The American Federation of Government Employees was the first to file a lawsuit against the federal government over the partial shutdown on Dec. 31. Their lawsuit is based on the Fair Labor Standards Act that entitles federal workers to double pay if they are not compensated on time. They were not part of the request to file a temporary restraining order and a lawyer on the case said he does not anticipate a hearing on their complaint prior to March. That’s the deadline for the federal government to respond to their case.

CLICK HERE TO GET THE FOX NEWS APP

The partial shutdown is now the longest in history – going on day 25 – with roughly 800,000 federal workers affected. Friday was the first full pay period workers missed due to the shutdown, but some are also waiting on overtime pay earned on Dec. 22 since the government shutdown began at midnight that day.

The funding standoff is over President Trump’s request for $5.7 billion to pay for the border wall on the U.S.-Mexico line. Democrats in Congress refuse to sign on to any legislation that includes funding for the wall and Trump has said he plans to hold his position.

The White House held talks with House Republicans on Tuesday, but their Democratic counterparts refused to attend, White House press secretary Sarah Sanders said.