But Biden wouldn't be willing to legalize marijuana right away, unlike other 2020 contenders. Sen. Bernie Sanders has said he'll remove the federal ban on marijuana during his first 100 days as president. Biden, however, remained firm that he wants scientific research to support his decision, saying he is "not prepared to [legalize] as long as there are serious medical people saying, ‘We should determine what other side effects would occur.'"

Biden's campaign told POLITICO that in his remarks on the recording, he was simply "restating his cannabis policy," which includes eliminating criminal penalties linked to marijuana, erasing marijuana-related criminal records and "letting states set their own policies regarding legalization of recreational marijuana while further effort is made to study the effects of cannabis use."

His campaign did not respond, however, to questions about the vice president's comment that marijuana needs to be "basically, legalized," leaving Biden's actual opinion unclear.

Biden has a history of going off script. At a November town hall, Biden said marijuana is "a gateway drug" and that legalization was a mistake. He walked back the gateway drug comment just a few weeks later, and on Tuesday in New Hampshire reiterated that he does not think it is a gateway drug. And when he was vice president, a Sierra Club member said Biden had expressed his opposition to the Keystone XL oil pipeline during a campaign event in South Carolina in 2013 — a stance that soon turned up in environmentalists' ads against the project, at a time when the Obama administration's official stance was that it was still studying the pipeline. President Barack Obama eventually rejected the project in 2015.

Biden has been criticized on the campaign trail for his approach to marijuana policy, including his longstanding support for stiff criminal penalties as a senator. Support for legalization has become almost a consensus stance among Democratic presidential candidates, and roughly three-quarters of Democrats back that position. That reflects shifting sentiments nationwide, with 33 states legalizing medical or recreational marijuana markets, including in some of the most conservative states in the country.

This change in view, though, mimics that of other politicians who have "evolved" on the position of marijuana legalization. In November, Rep. Tom McClintock (R-Calif.) — one of two Republicans to vote to advance the MORE Act, which would change the federal ban on marijuana, through the House Judiciary Committee — told POLITICO "I'm no fan of marijuana, but the laws have created more problems than they solve."

And Rep. Joe Kennedy (D-Mass.), who at first opposed marijuana legalization, said he changed his mind after realizing the disconnect between state and federal law was "not just a Catch-22 but almost — I can't say wholly unworkable — but incomprehensible."

Whether Biden's position has officially changed, his statement was perceived that way in the moment.

"I encourage you to talk about that a little on the debate stage," Murphy told Biden at the end of the recording. "There's this conflict that needs to be fixed and you get a chance to do it."

Mona Zhang contributed to this report.