SALT LAKE CITY — The Drug Enforcement Administration wants to block the American Civil Liberties Union of Utah from stepping into a court case over whether investigators can do warrantless searches of a database of all prescription drug records in the state.

More than 40 states keep similar databases, but Utah recently passed a law requiring investigators to get a warrant before they search it.

DEA lawyers argue they’re exempt from that law because they’re a federal agency, but state officials contend they have to follow it like other investigators.

The ACLU wants to jump into the suit in support of the state. They say allowing agents to access the information without a warrant amounts to an unreasonable search of people’s “digital medicine cabinets” — a violation of the Fourth Amendment.

But the DEA says the organization doesn’t have any business in the suit because agents are only asking to use the database for a specific investigation that doesn’t involve them, specifically whether a medical provider has been prescribing drugs to people who may be members of a criminal organization with ties overseas.

“Fourth Amendment rights are personal and may not be asserted vicariously,” DEA lawyers argue in court documents. Authorities argue the databases are an important tool for combating prescription drug fraud by tracing doctors handing out too many prescriptions or people going to multiple doctors for drugs. Police use of the Utah database has plunged since the law was passed because officers say it takes too long to go through the process of getting a warrant.

The ALCU argues police use of the databases brings up serious issues, and its voice should be heard in the lawsuit.

“We will be responding —energetically and thoroughly — to the federal government’s opposition to our involvement, in due time,” said John Mejia, legal director for the ACLU of Utah, in a statement.

The organization has the backing of the gay rights group Equality Utah, who says that warrantless database searches can violate the privacy of transgender people using hormone replacement therapy drugs.

The ALCU is also representing a firefighters union. Utah’s measure requiring a warrant was passed after two firefighters said they were wrongly charged with prescription drug fraud after a wide-ranging search of the database.

Though the charges were later dismissed, the firefighters are suing the state in a separate case they say could set a precedent for how officers in other states use the records. Nearly 20 other states also require police to jump through some hoops to access the databases.