SALT LAKE CITY (AP)  The American Civil Liberties Union and Utah state officials are arguing that a judge’s recommendation to allow the Drug Enforcement Administration to do warrantless searches of a prescription drug database violates people’s privacy rights, the ACLU said Monday.

Safeguards are needed for a database that contains records of prescriptions for medication like the anti-anxiety drug Xanax and the sleep aid Ambien as well as prescription painkillers, the ACLU said in a statement.

The DEA counters that access is an important tool in the early stages of the agency’s investigations.

The ACLU filed its objection Friday to a recommendation earlier this month from U.S. Magistrate Judge Dustin Pead. He said the DEA should have access to a database already in government hands.

“ACLU’s arguments are akin to a criminal defendant suggesting that the federal government must seek a warrant to obtain a defendant’s records from local police,” Pead wrote on March 13.

ACLU attorneys called that parallel off target in its reply.

“A better analogy would be to the contents of students’ private emails stored on a state university’s servers; though such files are held by a government entity, surely that fact alone does not divest them of protection under the Fourth Amendment,” they wrote in a court filing.

Utah state officials also objected to Pead’s recommendation in a separate court filing, pointing to ACLU’s reasoning.

U.S. District Judge David Nuffer will decide whether to accept the recommendations.

More than 40 states keep similar databases, but Utah recently passed a law requiring investigators to get a warrant before they search it. Utah is among the minority of states that have that requirement.

The measure was passed after two firefighters said they were wrongly charged with prescription drug fraud after a wide-ranging search of the database.

They were charged after police investigating ambulance drug thefts ran hundreds of names through the system on a hunch that it might be an inside job.

The two men were not linked to the thefts, but their relatively high number of prescriptions raised suspicion and prosecutors filed fraud charges. The case was later dropped, but still put their careers and personal lives at risk, they said.

The Utah firefighters union and a state gay-rights group joined the ACLU in the lawsuit.

The firefighters’ union said it is sympathetic to the need to curb a nationwide problem with prescription drug abuse, but that police shouldn’t have unfettered access.