New York lawmakers this week failed to pass a marijuana legalization bill, but they did advance a marijuana decriminalization bill to the governor’s desk.

The new bill would make it so anything up to one ounce of marijuana can only be punished with a fine of up to $50, down from $100, regardless of a person’s record. One to two ounces can only be punished with a fine of up to $200 — eliminating potential jail time — regardless of record. It would also get rid of a loophole in the previous marijuana decriminalization law for cannabis in “public view.”

The bill would also create a process to let people expunge past marijuana convictions, which could benefit as many as 600,000 New Yorkers. Marijuana sales, as well as possession above two ounces, would remain crimes punishable by jail or prison time.

New York had decriminalized possession of up to 25 grams (nearly an ounce) of marijuana in 1977 to only punish it with a fine. But that law imposed criminal penalties with potential jail time for those with a previous record. And it included a loophole: If marijuana was in public view (say, if a police officer got someone to empty his pockets), then it could still be treated as a crime punishable with potential jail time — a loophole that the new bill closes.

The state Assembly and Senate passed the decriminalization bill this week, and Democratic Gov. Andrew Cuomo is expected to sign it into law.

Marijuana decriminalization is different from marijuana legalization. Under decriminalization, possession of small amounts of pot no longer carries jail or prison time but can continue to carry a fine, and possession of larger amounts, repeat offenses, and sales or trafficking can still result in harsher sentences (including jail or prison in some states). Under legalization, penalties for marijuana possession are completely removed, and sales are typically allowed.

Some opponents of legalization favor decriminalization as a step toward peeling back America’s harsh drug and criminal justice policies. They see “tough on crime” policies as too punitive and costly, but they don’t want to resort to full legalization, which they fear would make pot too accessible in the US and allow big corporations to sell and market the drug irresponsibly.

The concern for legalization advocates is that decriminalization keeps the ban on selling marijuana, which means users wouldn’t have a legal source for the drug, and criminal organizations would therefore still have a source of revenue that they can use for violent operations around the world. The fines, while less punitive than arrests or prison time, can also cause problems, especially since they’re often applied in a racially disparate manner.

Ten states and Washington, DC, have legalized marijuana, although DC and Vermont don’t allow sales. Illinois is set to become the 11th state to legalize once Democratic Gov. J.B. Pritzker signs a recently passed legalization bill into law. Fourteen other states have only decriminalized.

New York lawmakers reportedly worked until the last minute to pass a marijuana legalization bill, but they couldn’t come to an agreement over some details, including how tax revenue from cannabis should be used.

Supporters of legalization argue that it eliminates the harms of marijuana prohibition: the hundreds of thousands of arrests around the US, the racial disparities behind those arrests, and the billions of dollars that flow from the black market for illicit marijuana to drug cartels that then use the money for violent operations around the world. All of this, legalization advocates say, will outweigh any of the potential downsides — such as increased cannabis use — that might come with legalization.

Opponents, meanwhile, claim that legalization will enable a huge marijuana industry that will market the drug irresponsibly. They point to America’s experiences with the alcohol and tobacco industries in particular, which have built their financial empires in large part on some of the heaviest consumers of their products. This could result in far more people using pot, even if it leads to negative health consequences.

New York couldn’t pass legalization. But decriminalization, at least, is being expanded.

For more on marijuana legalization, read Vox’s explainer.