HARTFORD — A Hartford man pleaded guilty Tuesday to selling heroin to two state men who died as a result of overdoses, according to federal authorities.

Joshua Holloway, 25, waived his right to be indicted and pleaded guilty in federal court to two counts of possession with intent to distribute, and distribution of, heroin, federal officials said in a release. The case came out of a statewide effort to target narcotics dealers who distribute heroin, fentanyl or opioids that cause death or serious injury to users, the release said.

According to court documents and statements made in court, on Feb. 16, 2017, Farmington police and emergency medical personnel responded to a residence in Farmington where they found an unresponsive 24-year-old male. “Life saving measures were attempted, but the male was pronounced deceased at the scene. A family member informed investigators that the victim had an opiate addiction. Officers did not locate evidence related to drug use, but seized the victim’s cellphone,” the release said.

The state Office of the Chief Medical Examiner determined the victim’s death “was caused by ‘acute heroin and fentanyl toxicities, alcohol and sertraline use,’” the release said. Witness interviews and analysis of the victim’s cellphone showed that Holloway supplied heroin/fentanyl to the victim on Feb. 15, 2017, in Hartford, the release said.

Further, the investigation revealed Holloway also sold heroin/fentanyl to a man in Avon on Feb. 11, 2017. “The purchaser ingested some of the heroin Holloway sold him and died shortly thereafter of an acute intoxication due to the combined effects of fentanyl, alpazolam and etizolam,” the release said.

Holloway, who was arrested on Jan. 23, 2018, is scheduled to be sentenced by U.S. District Judge Vanessa L. Bryant on Oct. 11, and faces up to 20 years on each count, the release said. He is free on a $50,000 bond pending sentencing.

The case was investigated by the Drug Enforcement Administration’s New Haven Task Force and the Farmington and Avon police departments. and is being prosecuted by Assistant U.S. Attorney Ray Miller, the release said.