With the end of 2016, one-fifth of the US population lives in a place where it is legal or will soon be legal to smoke marijuana for entirely recreational purposes.

It’s a result of the biggest year for marijuana legalization yet, in which the number of states that fully legalized marijuana doubled — from Alaska, Colorado, Oregon, and Washington to California, Maine, Massachusetts, and Nevada. And as legalization advocates look at the rest of the states, they see more opportunities for expansion — including, potentially, through state legislatures, instead of the voter-approved ballot initiatives that they’ve worked through until now.

It’s easy to overlook how quickly all of this happened. But just 10 years ago, marijuana legalization seemed extremely unlikely — President George W. Bush’s administration, for one, had raided medical marijuana shops in the hundreds, leaving even medical pot’s future uncertain. The idea that a decade later eight states, including the most populous in the nation, would fully legalize marijuana seemed hard to imagine. Yet here we are today.

Eight states now or will soon allow recreational marijuana sales

One way to look at the rapid development of the past few years, since Colorado and Washington became the first states to legalize in 2012: The country, in just five years, will go from having no states where marijuana is legal for recreational use to pot being fully legal across the entire West Coast, including Alaska, and several more states.

Four of these states (Alaska, Colorado, Oregon, and Washington) already allow sales of recreational marijuana to some degree. The remaining four that legalized pot in 2016 (California, Maine, Massachusetts, and Nevada) will set up their own system for sales in the next few years. (Washington, DC, legalized possession of marijuana, but not sales.)

This is only the beginning for legalization advocates. According to the Marijuana Policy Project, advocates hope to legalize marijuana in nine more states by 2019. Eight of these efforts will focus on lobbying state legislatures: Connecticut, Delaware, Illinois, Maryland, New Hampshire, Rhode Island, Texas, and Vermont. And one — Michigan — will likely go through a ballot initiative.

The transition to state legislatures is a turning point in the movement. With eight legal pot states, the issue is now mainstream enough, advocates think, that risk-averse state lawmakers can seriously consider it.

The major bellwether here could be California. As the country’s most populous state, it stands to show the rest of the nation — more than any other state — that legal pot can work. State lawmakers in particular may want to consider the jobs and tax revenue that will come out of California: One report from researchers at the investment bank Cowen estimated that legalization in California alone will triple the size of the nation’s current $6 billion legal pot industry within a decade. Another report from ArcView Market Research estimated that legalization in California would create a new $6.5 billion market for legal use by 2020.

And jumping from ballot initiatives to state legislatures is something that has worked for marijuana advocates before. After several states, including California, legalized pot for medical purposes, state legislatures suddenly began considering it — including big ones like New York state, Illinois, Minnesota, and, most recently, Ohio.

So while 2016 was the biggest year for marijuana ever, it may only be the beginning for the nationwide movement.

There is, however, one major roadblock in the way: the Trump administration.

The Trump administration poses a threat to legal pot’s spread in the next few years

On the campaign trail, President-elect Donald Trump seemed relatively friendly to state-level marijuana legalization, stating that he would like to leave legalization up to the states to decide.

But then Trump nominated Alabama Sen. Jeff Sessions to head the US Department of Justice, which oversees the Drug Enforcement Administration. Sessions is seen as one of the most conservative senators on drug policy and criminal justice issues. He once said, for example, that “good people don’t smoke marijuana” while criticizing Obama’s Justice Department for not cracking down on legal pot.

“If you had asked me a year ago who’s the worst senator on drug policy, I would have probably said Jeff Sessions,” Michael Collins of the Drug Policy Alliance recently told me. “Now he’s [set to become] the head of the Justice Department.”

Although marijuana is legal or soon will be legal under eight states’ laws, it remains illegal at the federal level — classified as a schedule 1 drug, the government’s strictest category for an illicit substance. So at the whim of the president, attorney general, or DEA, federal law enforcement could raid state-legal marijuana shops and arrest anyone for possessing pot, no matter what state law says.

The Obama administration has explicitly opted not to do this, issuing a set of memos — the Ogden and Cole memos — that told federal law enforcement officials to stop going after medical or recreational marijuana outlets as long as the outlets follow a certain set of guidelines (like not letting state-legal pot fall into minors’ hands).

Trump or Sessions could repeal these memos, letting federal law enforcement crack down on legal marijuana. And the US would once again see, as it did under Bush’s presidency and Obama’s first term, mass-scale raids on marijuana sellers.

But Trump and Sessions don’t even have to go that far to crack down on legal pot. They could just ask for tougher enforcement of the guidelines set out under the Ogden and Cole memos, which could lead to more raids. For example, if federal law enforcement under Sessions find out that a marijuana shop accidentally sold pot to one minor, they could use that as grounds for a full-blown raid and shutdown — while law enforcement today might see one bad sale as a one-off incident that doesn’t merit the full action of the DEA.

Another possibility is that Trump and Sessions don’t explicitly call for more action, but they look the other way as federal law enforcement crack down on states’ marijuana laws. To this end, the appointment of a “tough on crime” hard-liner like Sessions may embolden the DEA and other federal agencies to lash out, even without an explicit order to do so.

“The DEA was never on board with 99 percent of what the Obama administration wanted to do,” Collins said. “So it’s not like they’re necessarily waiting for a green light to do this.” (Obama himself recently acknowledged this, telling Rolling Stone that “the DEA, whose job it is historically to enforce drug laws, is not always going to be on the cutting edge about these issues.”)

But Trump probably isn’t a big enough threat to stop marijuana legalization for good

There is reason to doubt that Trump or Sessions will crack down on pot. Raids on state-legal marijuana shops could inspire a furious backlash, particularly since all eight states with legal pot approved it through voter initiatives. And most US adults support legalizing marijuana, according to surveys from the Pew Research Center — making a campaign against legal pot politically risky.

But even if the Trump administration overlooks the political risks and cracks down on states’ lax marijuana laws, that doesn’t mean it’s the end for legal pot. For their part, legalization advocates plan to push ahead with legalization anyway.

After all, advocates built up support and votes for medical pot as the Bush and Obama administrations allowed hundreds of raids on medical marijuana dispensaries from the early 2000s to early 2010s. And advocates’ campaigns worked: From 2001 to late 2012, 11 states legalized medical pot or allowed dispensaries. (And Colorado and Washington state legalized marijuana for recreational purposes in late 2012.) So the movement has a history of surviving federal crackdowns in the past.

There’s also the practical matter: There are now thousands of medical pot dispensaries alone in the US, with hundreds, if not thousands, more stores open or soon opening for recreational marijuana. It would require a massive operation for the DEA to shut all of these outlets down — an operation that could easily come under public criticism over misplaced priorities, especially as the DEA has an opioid painkiller and heroin epidemic to attend to.

This is the case for optimism under Trump: Although his administration may try, it’s possible that marijuana legalization is too popular — and, especially after California’s decision to legalize, too widespread — for Trump, Sessions, or anyone under them to really do anything about it.

And so 2016’s huge gains for marijuana legalization are very likely here to stay.