The National Security Agency was blocked by a judge from carrying out plans tomorrow to begin destroying phone records collected for surveillance after a privacy group argued they are relevant to lawsuits claiming the practice is unconstitutional.

U.S. District Judge Jeffrey White in San Francisco ordered the agency today to retain the records and scheduled a hearing for March 19 on whether they can be destroyed. The U.S. Foreign Intelligence Surveillance Court in Washington ruled March 7 that the NSA couldn’t keep the bulk of the collected phone records for more than five years because the privacy rights of the people whose phone data was swept up in the agency’s database trump the need for the information in litigation.

The Electronic Frontier Foundation, an online civil liberties group based in San Francisco, said the documents it wants retained are covered under preservation orders in two lawsuits challenging NSA surveillance.

The retention of phone records has emerged as one of the most contentious issues for the government stemming from the documents leaked by former security contractor Edward Snowden. Civil liberties groups argue that such data collection violates privacy rights. Government officials say the information is needed to combat terrorism.