April 17 (UPI) -- All above-ground construction of the White House ballroom must be stopped amid litigation, a federal judge ordered Thursday, reprimanding the Trump administration for trying to justify continued work on the building as necessary for national and presidential security concerns.

"National security is not a blank check to proceed with otherwise unlawful activity," U.S. District Judge Richard Leon said.

The ruling comes almost three weeks after Leon issued a preliminary injunction against the $400 million project, finding that construction at the White House requires congressional approval. While ordering the construction halt amid appeal, Leon carved out an exception for the government to continue underground work deemed necessary for the White House's safety and security.

That prompted litigation over the scope of the carve-out and the Trump administration argue that construction of the ballroom above ground was needed as security elements ran through the entire facility.

"Defendants argue that the entire ballroom construction project, from tip to tail, falls within the safety-and-security exception and therefore may proceed unabated. That is neither a reasonable nor a correct reading of my order!" Leon said Thursday.