There was a time when it was taboo for presidential candidates to talk about marijuana. Bill Clinton said he smoked but “didn’t inhale”. Barack Obama said he did inhale and even did some cocaine in his youth – “maybe a little blow” – but said the drug use was “reflective of the struggles and confusion of a teenage boy”. As presidents, both continued the “war on drugs” and upheld the prohibition of marijuana.

Times have changed. Last month, the California senator Kamala Harris was unrepentant and giggling as she told a New York radio show she smoked pot as a student. Asked if she supported legalisation, she said: “Half my family’s from Jamaica. Are you kidding me?”

Among 2020 candidates, marijuana legalisation is a mainstream issue. Among Democrats, nearly all have expressed at least some degree of support. Even Donald Trump’s lone Republican challenger, the former Massachusetts governor Bill Weld, supports it. Advocates are optimistic that the 2020 election could help bring an end to the federal prohibition of the drug.

The support for marijuana legalisation has quickly become a litmus test in the 2020 Democratic primary Erik Altieri, Norml

“The support for marijuana legalisation has quickly become a litmus test in the 2020 Democratic primary,” said Erik Altieri, executive director of the National Organization for the Reform of Marijuana Laws (Norml). “With the upcoming primary, it is also clear that support for prohibition is ultimately disqualifying with the Democratic electorate – and with the American electorate generally.”

The cascade of pro-legalisation candidates is a reflection of a country where attitudes towards marijuana have shifted dramatically.

Since 2012, 10 states and the District of Columbia have legalised recreational use. More appear to be on the path to legalisation, which, according to a Pew Research Center poll last year, 62% of Americans support. That poll also found nearly seven in 10 Democrats to be supportive, as were 49% of Republicans and 75% of independents.

“No matter where [candidates] are on the issue, they can read the polls,” said Don Murphy, director of federal policy at the pro-legalisation Marijuana Policy Project (MPP) and a Republican national convention delegate for Maryland in 2016.

But according to the federal Drug Enforcement Administration (DEA), marijuana remains a schedule 1 drug. That puts it on par with heroin or LSD, characterized as a substance with no accepted medical use and a “high potential for abuse”.

Among Democratic candidates, the New Jersey senator Cory Booker has been seen as a leading pro-legalisation voice. Late last month, he reintroduced legislation that would in effect legalise marijuana at the federal level. His Marijuana Justice Act would take cannabis off the DEA schedule of controlled substances, punish states that do not legalise it by withholding some federal funds, clear records for federal marijuana offenses and invest in communities affected by the “war on drugs”.

The Massachusetts senator Elizabeth Warren, the California senator Kamala Harris, the Vermont senator Bernie Sanders and the New York senator Kirsten Gillibrand, all rivals for the nomination, are co-sponsors. The Minnesota senator Amy Klobuchar, who recently said she supported legalisation, did not co-sponsor the bill.

Some still considering a run have not come out for legalisation. The former vice-president Joe Biden, for example, has said legalisation would be a “mistake” and called marijuana a “gateway drug”. But in a party where marijuana legalisation increasingly looks like a part of the platform, continued opposition could hurt his chances.

“I don’t know how you survive a Democratic primary if you’re on the wrong side of this,” said Murphy.

Nothing improves the record of a Democrat on drug policy reform like a contested primary Don Murphy, Marijuana Policy Project

If Biden reversed course, he would not be the only candidate to do so. As San Francisco district attorney, in 2010, Harris opposed legalising marijuana in California, saying it would encourage high drivers and workplace drug use. Now in favour of legalisation, she says marijuana “gives a lot of people joy”.

Warren was against legalisation in 2012, but has said she voted to legalise it in Massachusetts in a 2016 referendum. She has pushed for additional reform and last year introduced a bipartisan bill that would protect states that legalise marijuana from federal prohibition of the drug.

“I can’t help but look through some of their records and wonder if this isn’t a position of convenience,” said Murphy. “Nothing improves the record of a Democrat on drug policy reform like a contested primary.”

John Hudak, author of Marijuana: A Short History and a policy expert with the Brookings Institution, said criticisms of candidates changing views were unfair.

“It feels a lot to me like the criticisms that were being lobbed at candidates over their evolution of same-sex marriage,” he said. “There were a lot of Americans 20 years ago who did not support cannabis legalisation. To criticise a candidate for having a position 20 years ago that the average voter had 20 years ago is a non-starter.”

Facebook Twitter Pinterest Jessica Mann, left, gives change to a customer at Cannabis City in Seattle. Photograph: Ted S Warren/AP

While Hudak said candidates coming to support legalisation after opposing it was not too damaging, it was probably not enough to simply say they support legalisation.

“What I do think could be a campaign-ending liability is a Democratic primary candidate who can’t talk about legalisation in a way that connects with the party, particularly when that conversation leads into questions over criminal justice, racial justice and economic inequality,” he said.

The bully pulpit

If a pro-pot candidate is elected president, could they actually legalise marijuana?

“It would be hard to overstate the importance of having someone in the White House who used their bully pulpit to advance this kind of legislation that would de-schedule marijuana and allow for states to support setting their own policies on it,” said Altieri, of Norml.

“Never before have we had that in any president, much less, really, in a presidential candidate.”

Congress would be the ideal path towards legalisation, however, and that could be tricky for a Democrat if Republicans retain control of the Senate.

Marijuana prohibition has been an utter failure that has gone on for too many decades, ruined too many lives Erik Altieri

While Obama once said marijuana’s classification was “a job for Congress”, experts say a pro-legalisation president could get marijuana removed from the DEA schedule without congressional approval by appointing an attorney general who would advocate for the cause.

Murphy of the MPP said legalisation efforts might not have to wait until the next election, as there was increasing appetite for it among Republicans, too. If Donald Trump de-scheduled marijuana, “he wouldn’t get much pushback”, he said.

And while Republicans might resist Booker’s Marijuana Justice Act, which would punish states that did not legalise marijuana, Warren’s bill protecting states where marijuana is legal could attract Republican support. The president, for one, said last year he would “probably” support Warren’s bill.

Altieri said Trump’s marijuana policy remained “an enigma”, given the president’s statements supporting states’ rights while simultaneously “filling his cabinet with people that subscribe to the old school ‘reefer madness’ mentality”.

But Americans, he said, realised “that marijuana prohibition has been an utter failure that has gone on for too many decades, ruined too many lives and cost this country hundreds of millions of dollars over the past 40 years – and it’s time for that to end”.

“It’s becoming clear to the Democratic presidential campaigns at this moment that not only is supporting marijuana reform good policy, it’s also good politics.”