Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A federal judge in Washington, D.C. on Tuesday denied a request by unions, including for the nation's air traffic controllers, to force the government to pay workers who are continuing on the job during the shutdown.

U.S. District Judge Richard Leon said that only Congress can appropriate funds and granting the requests by the National Air Traffic Controllers Association and another union would cause public chaos.

“It’s hard not to empathize” with federal workers during the government shutdown, Leon said. “They’re not the ones at fault ... I don’t doubt that there’s real hardship felt.”

However, he said the shutdown is a “political problem,” and the judiciary cannot get involved.

“The judiciary is not and cannot be just another source of leverage,” he said. "It would be profoundly irresponsible."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The union that represents thousands of U.S. air traffic controllers filed the lawsuit on Friday seeking a temporary restraining order against the federal government for allegedly violating their Fifth Amendment rights by denying them "hard-earned compensation without the requisite due process."

The air traffic controllers, who on Thursday missed their first paychecks since the shutdown began, also claimed the failure to pay them during the shutdown could pose a threat to passengers’ safety. This shutdown is now the longest in the nation’s history.

Leon's ruling also pertained to a separate request by the National Treasury Employees Union to stop the federal government from continuing to require employees to work without pay.

“This case is simple. If employees are working, they have to be paid. If there is no money to pay them, then they should not be working,” the treasury union's president, Tony Reardon, said. “The shutdown, now in its fourth week, has become downright untenable for tens of thousands of employees who have no way to pay for their basic living expenses."

Leon said Tuesday that although workers are not being paid at the moment, they will receive back pay after the shutdown ends.

A lawyer for the Justice Department agreed with that position.

“The question is when, not if,” the attorney said.

An estimated 800,000 federal workers have been impacted by the shutdown.

Even with Leon's ruling on Tuesday, he set a briefing schedule for the preliminary injunction requested by the unions and will hear arguments on Jan. 31.