A candidate who lost the DFL primary for Minnesota attorney general registered last week as a write-in candidate.

Former Ramsey County Attorney Tom Foley said Thursday that "a number of people" asked him to run so their votes could be counted.

In Minnesota, voters have the option of writing in a candidate's name, but for some offices (such as state, judicial and county offices) those eligible candidates need to file a written request by Oct. 30 to have those votes counted.

"I'm not so delusional to think that you can win a write-in campaign on a statewide race without putting in a lot of effort," Foley said. "I'm just saying that people that support me and wanted that vote recorded and that's the purpose."

U.S. Rep. Keith Ellison won the DFL primary and will face Republican Doug Wardlow in the November election. The contest has been marked by a domestic abuse allegation against Ellison by an ex-girlfriend that emerged just days before the primary, and which he denies.

Of the five Democrats who were competing to be their party's pick in the primary, Foley finished third with 12.5 percent of the vote.

Foley has said he is focused on consumer protections for seniors, safe schools and the environment.

"A lot of people know my positions from the race we ran in the primary," he said. "But there's a large disconnect with the two party candidates running for attorney general, and a lot of people are unhappy with that choice and that's why they want to write my name in."

Foley said he is not actively campaigning or spending money, but would be "honored to have your vote. You just have to write it in," he said.