It's 2018 and marijuana remains illegal in the United States.

But continued federal prohibition hasn't stopped the marijuana industry from growing like a very profitable weed.

Despite what could be considered an unfriendly administration in Washington D.C., nine states and the District of Columbia now allow for recreational marijuana use and 30 allow for medical use. And more states are lining up to join the legalization wave. Pot has become big business in the U.S.

The emerging industry took in nearly $9 billion in sales in 2017, according to Tom Adams, managing director of BDS Analytics, which tracks the cannabis industry. Sales are equivalent to the entire snack bar industry, or to annual revenue from Pampers diapers.

That was before California opened its massive retail market in January. The addition of the Golden State is huge for the industry and Adams estimates that national marijuana sales will rise to $11 billion in 2018, and to $21 billion in 2021.

The industry has also been creating jobs and opportunities. There are 9,397 active licenses for marijuana businesses in the U.S., according to Ed Keating, chief data officer for Cannabiz Media, which tracks marijuana licenses. This includes cultivators, manufacturers, retailers, dispensaries, distributors, deliverers and test labs.

More than 100,000 people are working around the cannabis plant and that number's going to grow, according to BDS Analytics. The industry employed 121,000 people in 2017. If marijuana continues its growth trajectory, the number of workers in that field could reach 292,000 by 2021, according to BDS Analytics.

Related: How much to pot jobs pay? Botanists make more than budtenders

The economic benefits have helped states where marijuana has been legalized by funneling tax revenue from the sale of the drug to things like education and infrastructure

BDS Analytics estimates that the industry owed $1 billion in state taxes in 2016, and owes another $1.4 billion for 2017.

"It's a great thing because the money was already being spent [when it was illegal;] it's just now being taxed," said Tick Segerblom, state senator from Nevada, which has reaped $25 million in tax revenue since recreational sales started in July. "And cops don't have to waste their time arresting users."

Marijuana isn't just marijuana anymore. The products on offer at legal dispensaries range widely from the traditional flower to processed products like oil, hash, shatter and rosin, which can be smoked or vaped, and a wide variety of edibles including baked goods, candies and gummies.

Related: IRS collects billions in pot taxes, much of it in cash

Its roots are spreading into the health and wellness industry, too.

CBD, or cannabidiol, is a product in the form or oil or candy that's used as a treatment for epilepsy or pain even though it faces a federal ban. The industry for CBD, derived from both hemp and marijuana, totaled $360 million last year, according to Sean Murphy, publisher of the Hemp Business Journal. He said it's expected to grow to $1.1 billion by 2020 and $1.8 billion by 2022.

So what's next?

The industry remains on shaky footing because of its precarious legal status, and the country's top law enforcement official recently injected a healthy dose of uncertainty into recreational programs in Colorado, Washington, Oregon, Alaska, California, Nevada, Massachusetts, Vermont, and Maine.

Related: Weed industry preps for fight after Sessions rips up Cole memo

Attorney General Jeff Sessions, an outspoken opponent of legal pot, took action on January 4 after California dispensaries started selling recreational marijuana. Sessions ripped up the nascent protections provided to the industry by the Obama administration. He rescinded the so-called Cole memo of 2013, the guidance from then-Deputy AG James Cole to federal prosecutors suggesting a hands-off approach to the state-legal industry.

The reaction was mixed, with some marijuana business owners vowing to plow ahead, but others worried about expanding in a politically risky business atmosphere.

"The whole industry is under a cloud because no one knows to what extent [Sessions] is willing to interfere with the states," said Keith Stroup, who co-founded the National Organization for the Reform of Marijuana Laws, or NORML, in 1970. "By the time we get 20 states that have fully legalized marijuana, then I think we'll have enough support to finally convince the federal government to get out of the way."

The game is about to get a lot bigger, with Canada planning to legalize in July and Eastern states in the U.S. catching the fever -- the state of Vermont just voted to lift prohibition in its state and New Jersey is expected to legalize recreational marijuana this year.

"The only thing you could really do to put the genie back in the bottle, is just start arresting everybody," Stroup said. "But I can't see it leading to some massive crackdown. That just seems like political disaster for the administration."