PORTLAND, Maine — A Rockland man is the first Mainer to be charged with possessing and distributing a synthetic drug that acts like an opiate and contributed to the death of Prince, according to a court document.

Adam Davis, 37, was arrested Thursday and charged in U.S. District Court with one count each of possession with the intent to distribute U-47700, the importation of U-47700 and being a drug user in possession of a firearm, according to information post on the court’s electronic case filing system.

U-47700, also known as “Pinky” or “Pink,” last year was designated a scheduled drug by the U.S. Drug Enforcement Administration. There is no state law prohibiting it, but the Legislature is considering a bill that would add it to the list of illicit drugs, said Roy McKinney, director of the Maine Drug Enforcement Agency.

“[The drug] has been cited as the cause of dozens of deaths across the U.S. in the last several months — including, most notably, the overdose death of Prince, caused by a ‘cocktail’ that included Fentanyl and U-47700,” Rolling Stone reported on Oct. 4.

Davis made his first court appearance Thursday before U.S. Magistrate Judge John H. Rich III, but he was not asked to enter pleas because he has not yet been indicted by the federal grand jury. Davis was released Friday on $10,000 unsecured bail, according to information filed on the court’s electronic case filing system.

The investigation that led to Davis’ arrest began in January at a U.S. Postal Service sorting facility, according to documents. An inspector in Lexington, Kentucky, opened a package sent from China to Davis’ Rockland address that he thought was suspicious.

Authorities analyzed the powder inside the package, which was confirmed as U-47700, the affidavit said.

Investigators in Maine picked up the package on Jan. 25 when it arrived in Maine and, armed with the search warrant, delivered it to Davis, the complaint said. Davis, who agreed to talk with them, said he suffered from cerebral palsy and was in constant pain. He said he learned of the drug last July and told investigators he did not know it was illegal.

Text messages found on Davis’ phone showed that he planned to sell some of the drug to other people, and during the search of Davis’ home, a hunting rifle was found that led to the gun charge, the complaint alleged.

U-47700 was created in the 1970s by the pharmaceutical firm Upjohn, according to Rolling Stone. It was engineered to treat severe pain associated with cancer, surgery or injury but to be less addictive than morphine. It was never tested on humans and never marketed, according to the magazine.

An Upjohn chemist patented the drug in 1976. That patent included instructions on how to make U-47700, which is how drug labs in China were able to make it, Rolling Stone reported.

Heather Gonzales, the Portland attorney who represents Davis, and Assistant U.S. Attorney Michael Conley declined to comment on the case.

If convicted, Davis faces up to 20 years in prison and a fine of up to $1 million on the drug charges. He faces up to 10 years in prison and a fine of up to $250,000 on the gun charge.