This undated photo provided by the U.S. Drug Enforcement Administration shows fentanyl-laced pills seized by the agency. (Drug Enforcement Administration via AP)

Authorities said a man who sold heroin and fentanyl to two people who later died and another person who overdosed but did not die in Virginia has been sentenced to 21 years in prison.

Joseph Riley Curry, 29, who is from Canada but was living in Leesburg, was given the sentence last week for the drug-related incidents in 2016, according to the U.S. Attorney’s Office for the Eastern District of Virginia.

Curry sold the drugs to customers in Loudoun County, prosecutors said. The deaths and overdose incident happened in March 2016, and Curry was arrested in August 2017.

G. Zachary Terwilliger, the U.S. attorney for the Eastern District of Virginia, said in a statement that Curry’s distribution of the drugs “carried grave consequences” that led to the overdoses.

Heroin overdoses have soared in the District and in other U.S. cities in recent years, just as more widespread discussions and efforts have been made to focus on what many experts have called an opioid epidemic.