DENVER — Colorado is considering an unusual strategy to protect its nascent marijuana industry from a potential federal crackdown, even at the expense of hundreds of millions of dollars in tax collections.

A bill pending in the Legislature would allow pot growers and retailers to reclassify their recreational pot as medical pot if a change in federal law or enforcement occurs.

It’s the boldest attempt yet by a U.S. marijuana state to avoid federal intervention in its weed market.

The bill would allow Colorado’s 500 or so licensed recreational pot growers to instantly reclassify their weed. A switch would cost the state more than $100 million a year because Colorado taxes medical pot much more lightly than recreational weed — 2.9 percent versus 17.9 percent.

The measure says licensed growers could immediately become medical licensees “based on a business need due to a change in local, state or federal law or enforcement policy.” The change wouldn’t take recreational marijuana off the books, but it wouldn’t entirely safeguard it either. What it could do is help growers protect their inventory in case federal authorities start seizing recreational pot.

The provision is getting a lot of attention in the marijuana industry following recent comments from members of President Donald Trump’s administration. White House spokesman Sean Spicer has said there’s a “big difference” between medical and recreational pot.

Sponsors of the bill call it a possible exit strategy for the new pot industry. It’s hard to say how many businesses would be affected, or if medical pot would flood the market, because some businesses hold licenses to both grow and sell marijuana in Colorado.

The state had about 827,000 marijuana plants growing in the retail system in June, the latest available data. More than half were for the recreational market.

“If there is a change in federal law, then I think all of our businesses want to stay in business somehow. They’ve made major investments,” said Sen. Tim Neville, a suburban Denver Republican who sponsored the bill.

If federal authorities start seizing recreational pot, Colorado’s recreational marijuana entrepreneurs “need to be able to convert that product into the medical side so they can sell it,” Neville said.

His bill passed a committee in the Republican Senate 4-1 last week.

But it’s unclear whether the measure could pass the full Colorado Senate or the Democratic House. Skeptics of the proposal doubt the classification change would do much more than cost Colorado tax money.

“It’s a big deal for our taxation system because this money has been coming in and has been set aside for this, that and the other,” said Sen. Lois Court, a Denver Democrat who voted against the bill.

Schools would be the first casualty of a tax change. Colorado sends $40 million a year to a school-construction fund from excise taxes on recreational pot. It’s a tax that doesn’t exist for medical pot.

Other items funded by recreational pot in Colorado include training for police in identifying stoned drivers, a public-education campaign aimed at reducing teen marijuana use, and an array of medical studies on marijuana’s effectiveness treating ailments such as seizures or post-traumatic stress disorder.

The proposal comes amid mixed signals from the federal government on how the Trump administration plans to treat states that aren’t enforcing federal drug law.

Spicer said the president understands the pain and suffering many people, especially those with terminal diseases, endure “and the comfort that some of these drugs, including medical marijuana, can bring to them.”

But Attorney General Jeff Sessions has voiced doubts about pot’s medical value.

“Medical marijuana has been hyped, maybe too much,” Sessions said in a speech to law enforcement agencies in Richmond, Virginia.

Marijuana activists say giving the industry an option to keep their inventory legal is a valuable idea for recreational pot states. They point out that a change in federal policy wouldn’t make the drug magically disappear from the eight states that allow recreational use, along with Washington, D.C.

“It would be very harmful to the state if it reverts back entirely to an underground market,” said Mason Tvert, a spokesman for the Marijuana Policy Project, a pro-legalization activist group.

If the bill becomes law, Colorado would be the first pot state to take action to protect producers from a federal drug crackdown, marijuana analysts said.

A bill pending in the Oregon Legislature aims to shield the names and other personal information of pot buyers by making it illegal for shops to keep an internal log of customers’ personal data, a practice that is already banned or discouraged in Colorado, Alaska and Washington state.

Other states such as California are considering proposals that would bar local and state law enforcement from cooperating with federal authorities on investigations into cannabis operations that are legal in their jurisdictions.

Meanwhile, members of Congress from some pot states have talked about trying to block federal intervention in marijuana states. Congress could reclassify marijuana so medical use is allowed, or it could try to block federal enforcement of marijuana prohibition through the federal budget.

But the proposed Colorado change may be a longshot effort.

Medical and recreational pot are the same product. The only difference between them is how they are used, and the U.S. Controlled Substances Act says marijuana has no valid medical use. Federal health regulators have rejected repeated attempts to carve out a legal place for marijuana use by sick people.

Sponsors concede there are no promises that reclassifying all that pot as medicine would stop a federal crackdown.

But they say Colorado shouldn’t sit idly by and wait to see if the Trump administration starts enforcing federal drug law by attacking businesses that are legal under state law.

“This bill allows the industry to know there is something after tomorrow, whatever tomorrow may bring,” Neville said.