As a newly elected U.S. senator, Martin Heinrich was cautious in 2012 when asked about legalizing marijuana.

Now, he's on board.

Up for re-election in November, the Democrat tweeted April 20 that "it's time to legalize marijuana."

And this summer, Heinrich signed on with little fanfare as a co-sponsor of the Marijuana Freedom and Opportunity Act, which would remove the drug from the federal government's list of Schedule I narcotics.

Of course, one of Heinrich's two challengers, former New Mexico Gov. Gary Johnson, a Libertarian, has been calling for legalizing marijuana since the 1990s, before it was cool.

But the prospect of Congress passing legislation to legalize the drug isn't promising, particularly if Republicans maintain control of the Senate in the election Nov. 5.

Even so, the U.S. Senate race in New Mexico offers a sign of the times, with two of the three candidates calling for legalizing recreational marijuana as more states and entire countries adopt increasingly liberal policies toward the drug.

"For a long time, marijuana was a 'third rail' issue," said Justin Strekal, political director at NORML, the National Organization for the Reform of Marijuana Laws. "Politicians are looking for the space to evolve and the public is giving it to them."

In a 2012 interview with the Albuquerque Journal, Heinrich said the war on drugs "as it has been framed has not been successful." And he was supportive of medical marijuana. But the freshman senator added: "I wouldn't say I'm briefed enough on the issue to make a commitment beyond that."

Since then, several states, including Colorado and Washington, have legalized marijuana for recreational use. Canada plans legalization in October.

The predictions of "doom and gloom" didn't come true, Heinrich said in a recent interview.

"I think about things over time," he said. "I watch what's going on and I make a decision based on the facts and the data."

"It's better to have a controlled situation where that product is pure and controlled and you have government regulation and ensure bad actors are not part of that equation," he said. "And I would much rather have that above board than pushed underground."

The legislation he is backing this year along with eight other Democrats and Sen. Bernie Sanders, an independent from Vermont, would decriminalize marijuana at the federal level by removing the drug from the government's schedule of controlled narcotics. Marijuana is currently listed as a Schedule I narcotic alongside heroin and peyote.

Removing marijuana from the schedule of controlled narcotics would allow states to legalize it without the looming threat of a federal crackdown.

The bill would also support state and local governments in expunging records of marijuana possession convictions, meaning many criminal records for relatively minor nonviolent crimes could be wiped clean at no cost to those prosecuted.

And the bill would let the federal government regulate marijuana advertising in the same fashion it regulates tobacco advertising.

Johnson has been outspoken on these issues for years. He has lambasted the war on drugs as an expensive bust, and he pushed to legalize marijuana when he was governor at a time when such proposals were relatively radical. Johnson is also known to enjoy the drug himself.

So, the Libertarian drew loud applause at a rally kicking off his run for Senate last month when he reiterated his support for taking marijuana off the federal government's list of Schedule I narcotics. He pitched legalization as having the potential to create thousands of jobs in the state.

But more broadly, Johnson argued that regulating marijuana more like alcohol would rein in the government's power and expand personal freedom.

"All of us need to pursue happiness as we see happiness whatever that might be as long as it doesn't do harm to others" Johnson told supporters. "Government is out to control everything in the box that they want it to go into. Democrats do it. Republicans do it."

Republican Mick Rich's U.S. Senate campaign says he recognizes the role of medical marijuana but is opposed to legalizing the drug for recreational use. Rich's campaign says research shows detrimental effects of recreational cannabis use.

And that message is sure to resonate with plenty of voters in a vastly rural and in some ways relatively socially conservative state racked with substance-abuse issues — from alcohol to heroin.

Regardless, NORML's Strekal said it is unlikely Congress would pass legislation decriminalizing marijuana as long as the Senate Judiciary Committee remains under the leadership of Sen. Chuck Grassley, a Republican from Iowa.

"Should there be a change in leadership ...," Strekal said. "It would become much, much more likely."