DENVER — The case of two Utah firefighters falsely accused of prescription drug fraud shows why police should not be allowed to search any state prescription drug records database without a warrant, their lawyer argued before a federal appeals court Tuesday.

Giving police unfettered access to the database, which contains information on every prescription for a controlled substance in the state, is unconstitutional, attorney Scott Michelman argued before a three-judge panel of the 10th Circuit Court of Appeals in Denver.

The database in question is similar to those used in more than 40 other states. The Utah case could set a precedent for states that don’t require police to get a warrant, said Michelman, of the group Public Citizen. He compared putting names into the database without probable cause to kicking down people’s doors and rifling through their medicine cabinets.

Utah authorities, though, contend that the Utah Controlled Substance Database helps curb a growing abuse problem by helping investigators identify doctors who overprescribe painkillers and people who go to multiple doctors looking for drugs.

The firefighters want the appeals court to revive a lawsuit that was dismissed last year.

“We’re not going into their homes, there’s no ownership of that information such that unreasonable search and seizure has occurred,” said J. Michael Hansen, an attorney for the Salt Lake City suburb of Cottonwood Heights.

Prescription drugs have long been a tightly regulated industry, and there’s no expectation that those records are shielded from police, he said.

The statute at the time didn’t require a warrant for police to access the database, “and they acted accordingly,” Senior Judge Michael R. Murphy said while questioning Michelman.

The panel didn’t immediately rule in the case, and no deadline was set for them to issue a decision.

Utah has since passed a law requiring a warrant, partly as a result of the firefighters’ case. The measure has drawn pushback from the Drug Enforcement Administration, which is suing to get warrantless access for its agents.

Before Utah’s law went into effect last year, the database was being used thousands of times a year. The number of searches has since plummeted; police said it takes too long to get a warrant.

Nearly 20 other states also require police to jump through some hoops to access the databases.

The firefighters sued after detectives investigating ambulance drug thefts in 2013 ran the names of all firefighters in their department through the database, suspecting an employee with a drug problem might be involved.

Ryan Pyle and Marlon Jones weren’t linked to the thefts, but authorities alleged they were taking too many medications without telling their doctors and filed fraud charges against them.

The cases were dismissed after the firefighters showed all the drugs were properly prescribed, but they said the charges nevertheless still put their careers and personal lives in jeopardy.

Whitehurst contributed from Salt Lake City.