Minnesota attorney general candidates Republican Doug Wardlow and Democrat U.S. Rep. Keith Ellison attacked each other's character and political histories and clashed over the very nature of the job in a vitriolic debate Sunday night.

Candidates for governor and U.S. Senate also faced off on issues including health care, immigration and taxes in a series of debates at Metropolitan State University in St. Paul that aired Sunday on KSTP-TV. Several candidates sharpened their tone and critiques of opponents as they tried to attract voters who are wavering with two weeks until Election Day.

In the second and final debate between the two attorney general candidates, Ellison and Wardlow frequently spoke over each other, calling the other's comments false.

"The job of the attorney general is not to weigh in and make laws. Keith Ellison apparently thinks it is. If you want to make laws, you should have stayed in Congress," Wardlow said.

Ellison shot back that throughout Minnesota's history, attorneys general have been clear about what policies they support.

"It's very clear [Wardlow] has a policy agenda. He just doesn't want to say what it is," Ellison said. "And I think it's fair for the people to know."

In the governor's debate, Jeff Johnson, a Republican Hennepin County commissioner, said he would trim government waste in an effort to cut taxes. Tim Walz, a Democratic congressman from Mankato, said he would invest in roads, schools and health care to keep Minnesota prosperous.

Walz and Johnson clashed fiercely on health care, an issue voters have consistently said is the most important this election.

"I believe health care is a basic human right. I have not heard Jeff say that," Walz said.

Johnson said Walz's preference for a single-payer health care system means Minnesotans would lose their insurance even if they like it.

"Your insurance is gone. If you don't want your VA for all, that would be bad news for you," he said, meaning people would lose private insurance if the country switched to Medicare for all, or in his formulation, VA for all.

Walz, who has represented southern Minnesota in Congress since 2007, spent 24 years in the National Guard and more than 20 years as a high school teacher and football coach, most recently in Mankato.

Johnson, of Plymouth, is in his third term with the Hennepin County Board and previously served in the Minnesota House. He was the Republican nominee in 2014, losing to Gov. Mark Dayton.

Walz is seeking to succeed Dayton and become the first Democrat to follow another Democrat.

Entering the final two weeks of the campaign, Walz and Johnson are trying to rally their respective supporters while winning over undecided and independent voters. A Star Tribune/MPR News Minnesota Poll showed 12 percent of voters undecided on the governor's race, with about one in seven likely voters unfamiliar with the candidates.

The same poll showed Walz leading 45-39, but his lead has shrunk since an earlier Star Tribune Minnesota Poll.

Democratic U.S. Sen. Amy Klobuchar and Republican challenger Jim Newberger also highlighted their health care stances in a debate that was taped earlier.

Klobuchar said it's important to protect the Affordable Care Act, also known as Obamacare. People with pre-existing conditions like diabetes would be kicked off their insurance plans if it is repealed, she said. She also said she favors importing drugs from Canada that are expensive in the U.S. to reduce costs.

Newberger, a state representative and longtime paramedic, said rural community hospitals would be shut down if a Medicare-for-all-style health care system is passed. He said lawmakers should sit down with big pharmaceutical companies, tell them they are "ripping us off" and work with them instead of turning to Canada.

The two candidates also disagreed on immigration issues.

Newberger said he wants to build a border wall and does not support sanctuary cities. He said the government needs to find out who is in the country illegally and deport criminals. But people who have been in the country for a substantial period of time who are not criminals should be given a path to citizenship, he said, noting, "You don't just hand out citizenship ... earn it."

On education, Klobuchar said she wants to expand vocational-technical programs and support community colleges.

She said students should be able to refinance their student loans, and community college should be free — a proposal that she said could be paid for by removing tax loopholes.

Newberger echoed the importance of technical and community college programs but said Klobuchar does not have a strong enough plan to support students. "Our kids are drowning in student debt," he said.

U.S. Senate candidate Republican Karin Housley took the stage solo because Democrat U.S. Sen. Tina Smith did not attend. Housley, a state senator, repeatedly hit Smith on issues from health care to elder care protections to immigration.

Much of the attorney general's debate was driven by attacks on records and comments. Ellison pressed Wardlow on his comment that he would fire 42 Democrats in the attorney general's office. Wardlow said he would not do a political purge, but he would make changes in the office which he said has been "thoroughly politicized."

Ellison also questioned Wardlow's work as legal counsel with the Alliance Defending Freedom, a Christian conservative organization. The group has defended business owners who wanted to deny services to same-sex couples and argued against allowing transgender children to use the bathroom or locker room of their choice.

Wardlow, meanwhile, called out Ellison's ties to Nation of Islam leader Louis Farrakhan — whom Ellison said he disavowed more than two decades ago — and said his opponent is "a cheerleader for cop killers." Early on the debate, he also noted abuse allegations against Ellison.

Ellison's former girlfriend's allegation of domestic abuse came out shortly before the primary election and had landed the race in the spotlight. Karen Monahan said Ellison was emotionally abusive and once tried to pull her off a bed while cursing at her in 2016. Ellison reiterated his denial of Monahan's domestic abuse allegation Sunday and noted that an investigation, conducted by an attorney who works at the same firm as the state DFL Party's lawyer, could not substantiate her story.