U.S. District Judge Henry Kennedy said a private group will suffer irreparable harm if the documents it has been seeking since December are not processed promptly under the Freedom of Information Act.
The Justice Department failed to meet the time restraints under FOIA and failed to make a case that it was impractical to deal quickly with the request by the Electronic Privacy Information Center.
Justice Department spokesman Charles Miller said no determination has been made as to what the government's next step will be.
At a court hearing a week ago, Justice Department lawyer Rupa Bhattacharyya said the government would respond starting March 3, but she said she had no information on when the process might be completed.
Timing will depend on complexity, "and in this case there are a lot of complexities," Bhattacharyya said.
Judge Kennedy wrote that "courts have the authority to impose concrete deadlines on agencies that delay the processing of requests meriting expedition."
Routine FOIA requests are to be handled within 20 days while expedited requests have no set time limit under the law, prompting the Justice Department to take the position that the amount of time for expedited requests could be longer than that for the routine 20-day handling.
"Congress could not have intended to create the absurd situation" enabling the government to unilaterally exceed the standard 20-day period, Kennedy wrote.
CBS News legal analyst Andrew Cohen says that while this is a victory for the plaintiffs, it is by no means a major ruling that will instantly lift the lid of secrecy from the spying program.
"The judge didn't order the feds to suddenly release all sorts of classified or secret information. All the judge did was to tell the Justice Department that it has to speed up its response to a request for information about the National Security Agency program," said Cohen. "And the information that initially will be released will be very unspecific. The big battles are yet to come over how much of this stuff eventually is made public."
In a related development, the Justice Department said Thursday that it has begun an internal inquiry into the conduct of its lawyers who examined the NSA's eavesdropping program.
The investigation is being conducted by the Office of Professional Responsibility, or OPR, which reviews allegations of misconduct within the law enforcement agency.