Lawmakers introduced legislation Thursday aimed at resolving the long-running tension between states that legalized medical and recreational marijuana sales and the federal government, which still deems all use a federal crime.

The bill, offered by Sens. Cory Gardner, R-Colo., and Elizabeth Warren, D-Mass., comes after President Trump's April assurance to Gardner that he would support reform.

Gardner told reporters at a morning press conference that "I have spoken to the president today and certainly that was part of the conversation."

The Strengthening the Tenth Amendment Through Entrusting States Act, or the STATES Act, would change federal law to say that the federal Controlled Substances Act doesn't apply to state regulated markets. It sets a 21-year age requirement for recreational sales, and removes industrial hemp, or low-THC cannabis, from the CSA, making it legal to grow nationwide. It would also ease banking hurdles to state legal pot businesses.

"I have spoken to the president about this approach. I have talked to him about this bill," Gardner said.

"In the previous conversations we had he talked about the need to resolve the conflict between state and federal law," he said. "We talked about his support for a states rights approach during the campaign, and he's talked about that in the days since with me. Not putting word in the mouth of the White House, but I think this will be an opportunity to fulfill that federalism approach."

"Sen. Gardner has done great work to plow the ground," Warren said at the press conference. "This is not a bill that forces legalization on any state that doesn't want it. We are trying to respect the voters of our states. ... This is an example of Congress doing its job."

Although pot possession for any reason outside limited research remains a federal crime, more than two dozen states have authorized medical marijuana markets since 1996. Eight have laws regulating recreational sales.

Gardner won Trump's initial backing by blocking Justice Department nominations after Attorney General Jeff Sessions withdrew the 2013 Cole Memo in January. That memo acted as a green light for states' autonomy by identifying specific trip wires for a federal crackdown, and Sessions' move was seen as a threat by states like Colorado.

Sessions, a longtime marijuana legalization opponent, empowered individual U.S. attorneys to decide whether to prosecute marijuana crimes, putting the fate of a multibillion-dollar state-legal industry in question.

In at least two phone conversations in April, Trump assured Gardner that there would be no crackdown on Colorado's regulated recreational pot market, and that he would support legislation making marijuana federalism permanent. White House press secretary Sarah Sanders confirmed Gardner's account.

Although the threat of a federal crackdown loomed with Sessions leading the Justice Department, polls show overwhelming public support for marijuana legalization. A Pew Research Center poll in January found 61 percent support legalization, although a Gallup poll found 64 percent support late last year.

Trump’s April pledge to back legislation came the same week as former House Speaker John Boehner, R-Ohio, announced he had “ evolved ” his position and joined a marijuana business’ board of advisers.

Warren is a prominent progressive Democrat from Massachusetts, where voters opted to legalize recreational use in 2016. In addition, Alaska, California, Colorado, Maine, Nevada, Oregon, Vermont, Washington state and the District of Columbia have recreational legalization laws, though sales are unregulated in D.C. and Vermont.

Although there's solid polling support for reform, legislation may have a hard time passing, particularly in the House of Representatives, where Republicans opposed to marijuana control key posts, including House Rules Committee Chairman Rep. Pete Sessions, R-Texas. He was recently described by a prominent marijuana advocate as a legislative "sphincter" preventing measure from reaching the floor for a vote.

If the bill can reach the floor, the Gardner-Warren legislation likely would have a good shot at passing, particularly in the House, where medical marijuana-protecting legislation previously passed overwhelmingly and where in 2015 an amendment from Rep. Tom McClintock, R-Calif. That amendment protected state recreational marijuana markets, and it failed in a narrow 206-222 vote in which 45 Republicans voted in favor and 24 Democrats opposed it.

Companion legislation was introduced in the House by Reps. David Joyce, R-Ohio, and Earl Blumenauer, D-Ore.