ST. PAUL, Minn. -- It's one of the most closely watched congressional races in the nation, and for voters the contrast in candidates couldn't be clearer.

Republican Jim Hagedorn and Democrat Dan Feehan, who are vying to replace Rep. Tim Walz in southern Minnesota's 1st District, squared off Friday at the studios of Minnesota Public Radio for a live debate.

They pulled no punches.

Hagedorn, who is making his fourth run for the seat once held by his father Tom Hagedorn, has vowed to strongly support President Trump's policies. In fact, the president brought Hagedorn on stage with him briefly during his rally recently in Rochester.

Feehan, by contrast, said he'll respond to the president on a case-by-case basis, depending on what's best for the 1st District.

"I’m an independent voice that’s not beholden to any party leader, or corporate special interest, I’m willing to work with the president when it benefits southern Minnesota, but you better believe I’m willing to stand up to him when it doesn't," Feehan remarked.

Hagedorn responded by trying to paint Feehan as a Washington D.C. liberal who'll be part of the resistance movement.

"You’re not a very independent voice, you’re a very leftist voice, and you’re gonna go back there and you’re going to work with Pelosi, and you’re going to work against the president every step of the way!"

Feehan responded by calling Hagedorn too partisan.

"This is what he brings to the table, this idea of an us and them, and that’s not what I’m about at the end of the day. You want to talk about independent leadership is, it’s to look at a burning Pentagon on 9-11 and decide it’s time to suit up, it’s time to serve this country."

Feehan served two tours of combat duty in Iraq in the Army and National Guard, and later worked at the Pentagon as an acting assistant secretary of defense. The Red Wing native also spent time working as a teacher in Gary, Indiana.

Red Wing was once in the 1st District, but boundaries were redrawn since then and it's now in the 2nd District. That's why Hagedorn, who grew up on a farm in Truman, Minnesota, often points out he's the only candidate with direct ties to the district.

"You’re not from the district, you never lived in our district a day in your life, until Tim Walz quit this race and they sent you out from Washington!" Hagedorn told Feehan in the debate, broadcast live to a statewide audience.

Hagedorn's father moved the family to Washington while he was in Congress. And Jim Hagedorn ended working in the nation's capital for decades, first as a congressional aide and the later for the Dept. of Treasury and the Bureau of Engraving and Printing.

The Republican said his years in the Beltway will work to his constituents' advantage.

"I’ve worked in the congress. I have the experience to know where the bodies are buried, and go out there an unearth them, and reform government and downsize government."

Feehan suggested that Hagedorn should instead look for a job in the Trump administration.

"Washington is full of Jim Hagedorns. That’s why it is broken right now -- people who are beholden to their party leaders, people who are beholden to their corporate PACs."

The two sparred over immigration as well. Hagedorn supports the president's proposal to build a wall across the entire length of the Mexican border with the US.

Feehan said there are better, more modern ways to enforce border security, and that his experience in war zones has taught him that walls are easily breached. Hagedorn said Feehan's experience overseas didn't apply to the immigration issue here in the US.

"This is about service in the US House of Representatives, and it doesn't seem whatever you learned in the military has translated into informed positions on this particular issue, that reflect what the people of southern Minnesota want. They want border security, they don’t want this sanctuary politics that you and Walz and others are talking about."

The term "sanctuary city" is the Republican term for cites that enact "separation ordinances" designed to encourage undocumented immigrants to report crimes to police without fear of deportation.

Feehan shot back, referencing Hagedorn's description of former Sen. Max Cleland of Georgia, who lost both legs and an arm fighting in Vietnam.

"My opponent suggested the things I learned overseas weren't good for southern Minnesota. This is a consistent theme throughout his life. This is a person that, while I was overseas serving our country, fighting for our freedom, he sat behind a desk blogging about Minnesota veterans, blogging about the fact a triple amputee was a 'half soldier' and that he should just roll away."

The "half soldier" remark was from one of Hagedorn's "Mr. Conservative" blog posts from 2002.