AUGUSTA — A 24-year-old Waterville man pleaded guilty Thursday to unlawful trafficking in counterfeit drugs.

Devin W. Linnell sold someone a substance he said was heroin but proved to be acetyl fentanyl, said the prosecutor, Assistant Attorney General Katie Sibley. She said the substance is an extremely dangerous drug capable of causing bodily injury or death.

The transaction occurred April 9 in Augusta.

On Thursday during a hearing at the Capital Judicial Center, Justice Robert Mullen imposed a split sentence recommended by both attorneys, ordering Linnell to serve an initial six months in jail and suspending the remainder of the three-year term. He also placed Linnell on two years of probation.

The six-month jail sentence is concurrent to a probation revocation because Linnell was on probation at the time of the drug sale.

Sibley said the sale of the drug — for $20 — took place following a series of communications between a person cooperating with the Maine Drug Enforcement Agency and others.

Linnell’s defense attorney, Tom Carey, said he had listened to an audio recording of the transaction and believed that the state could prove the charge at trial.

Along with the jail time, Linnell was fined $400 and ordered to pay $140 restitution.