States Keep Saying Yes to Marijuana Use. Now Comes the Federal No.

In a national vote widely viewed as a victory for conservatives, last year’s elections also yielded a win for liberals in eight states that legalized marijuana for medical or recreational use. But the growing industry is facing a federal crackdown under Attorney General Jeff Sessions, who has compared cannabis to heroin.

A task force Mr. Sessions appointed to, in part, review links between violent crimes and marijuana is scheduled to release its findings by the end of the month. But he has already asked Senate leaders to roll back rules that block the Justice Department from bypassing state laws to enforce a federal ban on medical marijuana.

That has pitted the attorney general against members of Congress across the political spectrum — from Senator Rand Paul, Republican of Kentucky, to Senator Cory Booker, Democrat of New Jersey — who are determined to defend states’ rights and provide some certainty for the multibillion-dollar pot industry.

“Our attorney general is giving everyone whiplash by trying to take us back to the 1960s,” said Representative Jared Huffman, Democrat of California, whose district includes the so-called Emerald Triangle that produces much of America’s marijuana.

“Prosecutorial discretion is everything given the current conflict between the federal law and the law of many states,” he said in an interview last month.

In February, Sean Spicer, the White House press secretary, said the Trump administration would look into enforcing federal law against recreational marijuana businesses. Some states are considering tougher stands: In Massachusetts, for example, the Legislature is trying to rewrite a law to legalize recreational marijuana that voters passed in November.

Around one-fifth of Americans now live in states where marijuana is legal for adult use, according to the Brookings Institution, and an estimated 200 million live in places where medicinal marijuana is legal. Cannabis retailing has moved from street corners to state-of-the-art dispensaries and stores, with California entrepreneurs producing rose gold vaporizers and businesses in Colorado selling infused drinks.

Mr. Sessions is backed by a minority of Americans who view cannabis as a “gateway” drug that drives social problems, like the recent rise in opioid addiction.

“We love Jeff Sessions’s position on marijuana because he is thinking about it clearly,” said Scott Chipman, Southern California chairman for Citizens Against Legalizing Marijuana.

He dismissed the idea of recreational drug use. “‘Recreational’ is a bike ride, a swim, going to the beach,” he said. “Using a drug to put your brain in an altered state is not recreation. That is self-destructive behavior and escapism.”

Marijuana merchants are protected by a provision in the federal budget that prohibits the Justice Department from spending money to block state laws that allow medicinal cannabis. Under the Obama administration, the Justice Department did not interfere with state laws that legalize marijuana and instead focused on prosecuting drug cartels and the transport of pot across state lines.

In March, a group of senators that included Elizabeth Warren, Democrat of Massachusetts, and Lisa Murkowski, Republican of Alaska, asked Mr. Sessions to stick with existing policies. Some lawmakers also want to allow banks to work with the marijuana industry and to allow tax deductions for business expenses.

Lawmakers who support legalizing marijuana contend that it leads to greater regulation, curbs the black market and stops money laundering. They point to studies showing that the war on drugs, which began under President Richard M. Nixon, had disastrous impacts on national incarceration rates and racial divides.

In a statement, Mr. Booker said the Trump administration’s crackdown against marijuana “will not make our communities safer or reduce the use of illegal drugs.”

“Instead, they will worsen an already broken system,” he said, noting that marijuana-related arrests are disproportionately high for black Americans.

Consumers spent $5.9 billion on legal cannabis in the United States last year, according to the Arcview Group, which studies and invests in the industry. That figure is expected to reach $19 billion by 2021.

A Quinnipiac University poll in February concluded that 59 percent of American voters believe cannabis should be legal. Additionally, the poll found, 71 percent say the federal government should not prosecute marijuana use in states that have legalized it.

“This is part of a larger set of issues that the country is wrestling with right now, where a very strong-willed minority is trying to impose its value system on the country as a whole,” said Roger McNamee, an industry investor.

But marijuana businesses are bracing for a possible clampdown.

“People that were sort of on the fence — a family office, a high-net-worth individual thinking of privately financing a licensed opportunity — it has swayed them to go the other way and think: not just yet,” said Randy Maslow, a founder of iAnthus Capital Holdings. The public company raises money in Canada, where Prime Minister Justin Trudeau campaigned on a promise to legalize recreational use of marijuana.

Representative Earl Blumenauer, Democrat of Oregon and a co-chairman of the Congressional Cannabis Caucus, is urging marijuana businesses not to be “unduly concerned.”

“We have watched where the politicians have consistently failed to be able to fashion rational policy and show a little backbone,” he said. “This issue has been driven by the people.”