A third-party candidate for Minnesota attorney general is endorsing Democrat Keith Ellison in the tight race.

Noah Johnson, a Minneapolis attorney who’s running for the Grassroots-Legalize Cannabis party, said in an interview Sunday that he is throwing his support behind Ellison because the congressman called for the legalization of marijuana.

“There seems to be a respectable amount of support for my cause,” Johnson said. While his name will still appear on the ballot, he said he’ll try to steer his supporters to Ellison before Election Day.

“I think that’s a better idea than risking splitting the more enlightened side of the vote and risking Doug Wardlow being elected, which would not help our cause, certainly,” Johnson said.

Johnson’s candidacy has received little attention, but he did get support from 5 percent of likely voters in a Star Tribune/MPR News Minnesota Poll last month. That was the same margin by which Ellison was leading in the poll, which showed the Democrat with 41 percent and Wardlow, a Republican, with 36 percent of the vote.

Other polls have shown the race similarly close.

“I am honored to have the endorsement of Mr. Johnson, and agree with him and the majority of Minnesotans who believe we should legalize marijuana and enact restorative justice for nonviolent offenders,” Ellison said in a statement from his campaign.

Last Wednesday, Ellison posted his stance on drug policy reform on social media and his campaign website.

“Since my time as a public defense attorney, I have seen too many lives ruined by the harsh enforcement of current marijuana policies. It is time we listen to the majority of Minnesotans who believe we should legalize marijuana and enact restorative justice for nonviolent offenders caught up in our justice system,” Ellison’s statement said.

Ellison’s website suggests taxpayer dollars would be better spent on rehabilitation and dangerous offenders.

Wardlow, meanwhile, said in a debate last month on Twin Cities PBS that recreational marijuana legalization is a question for the state Legislature. He said if lawmakers take up the issue they should look at the experience of states like Colorado and Washington.

“It’s hard to see why Noah Johnson would throw his support behind Keith Ellison, who has been credibly accused of domestic abuse,” Wardlow’s campaign manager, Billy Grant, said in a statement, referring to the allegation by Ellison’s former girlfriend.

Karen Monahan has said Ellison was emotionally abusive and once in 2016 he tried to pull her off a bed by her legs and feet. Ellison denies the allegation and an attorney, hired by the state DFL Party, investigated and could not substantiate the claim.

“This endorsement shows that Keith Ellison’s campaign is seriously worried about their growing lack of support among left-leaning voters,” Grant said.

So far, nine states and Washington, D.C., have legalized recreational marijuana. Minnesota is among the majority of states that allow the use of medical marijuana. While the attorney general doesn’t have the power to change that, Johnson said whoever is elected could advise the Legislature to act on the issue and encourage a shift away from prosecuting people for use of marijuana.

Johnson, 29, of Minneapolis, said Ellison’s post on legalizing marijuana last week prompted his endorsement. But there is no way for him to remove his name from the November ballot at this stage.

Johnson is a criminal defense attorney who graduated from Mitchell Hamline School of Law last year and was admitted to the state bar this spring. He interned for the Innocence Project of Minnesota and ACLU of Minnesota. Ellison has been his representative in Congress for most of his adult life, Johnson said, and he has voted for him in the past.

When he entered the race he thought Attorney General Lori Swanson — who has expressed concerns about recreational marijuana legalization and people driving under the influence — would be the Democratic candidate, Johnson said.