The number of people sentenced for federal marijuana-related crimes dropped for the fifth year in a row, according to data released this week by the U.S. Sentencing Commission.

A total of 3,534 offenders received sentences for federal marijuana crimes in 2016. The overwhelming majority of these cases – 3,398 of them – involved trafficking marijuana. Another 122 individuals received federal sentences for simple possession of marijuana, although some of these offenders may have pleaded down from a more serious offense.

The commission’s statistics show that more than 97 percent of people charged with a federal crime plead guilty, rather than go to trial.

Special report: Marijuana in the age of Trump

Colorado and Washington became the first states to legalize recreational marijuana in 2012. The data show a sharp drop in the number of federal marijuana sentences the following year, down from 6,992 to 4,942.

The sale and use of marijuana for any purpose, recreational, medical or otherwise, remains a crime at the federal level even in states where it’s legal. But in 2013 the Justice Department issued guidance giving federal prosecutors leeway to ignore certain marijuana offenses, provided such behavior was otherwise in compliance with an applicable state law.

These federal numbers don’t include sentencing under state and local law, where the overwhelming majority of drug enforcement takes place. In 2015, for instance, more than a half-million people were arrested by state or local authorities for simple marijuana possession, according to FBI statistics. By contrast, only about 3,500 people received federal sentences for marijuana crimes of any sort that year.

Federal sentences for heroin have more than doubled over the past 10 years, according to the USSC, in part reflecting the current opioid epidemic. While 1,382 people received federal heroin sentences in 2007, over 2,800 were sentenced for heroin crimes last year.

But the overall number of federal heroin sentences is still low relative to most other drugs. That’s because heroin is a lot easier to smuggle: On a per-gram basis, heroin is about 26 times more valuable than marijuana, according to federal statistics from 2012. That means that small, easy to conceal heroin shipments can still be highly lucrative. (According to some estimates, the entirety of heroin consumed in a year in the United States could fit within one or two standard shipping containers.)

Heroin is a lot harder to detect, seize and charge people with than a cheaper, bulkier product like marijuana, but it’s also more dangerous. About 13,000 people overdose on heroin each year, while zero overdose on marijuana.

Much of the decrease in sentences is a function of the decisions made by individual U.S. attorneys. President Donald Trump recently fired all the remaining holdovers from the Obama administration, meaning that a new batch of prosecutors – who may have different ideas about what marijuana sentences have to do with the pursuit of justice – will soon be taking their place.