Rep. Tim Walz, long viewed as the most vulnerable congressional Democrat in Minnesota this year, avoided being swept up in the national Republican wave Tuesday and won election to a third term.

Walz defeated state Rep. Randy Demmer, a business owner who had hoped to take back a seat the GOP held from 1994 to 2006.

In his victory speech, Walz acknowledged that he would be in the minority party for the first time as Republicans took control of the House, but he said he remained optimistic.

"If there was a message today, the message is we have to get it done together," he said. "There's a lot of work yet to be done."

Demmer called Walz to concede shortly before midnight. He said he was proud of the campaign he ran.

The First District, which stretches across the rural, southern portion of the state, is known for being a swing region. Walz was first elected in 2006 when he upset Republican incumbent Gil Gutknecht amid a nationwide Democratic surge. Gutknecht himself had swept into office during the 1994 Republican wave.

Walz held a fundraising advantage of $1.9 million to $785,000 over Demmer and had been running TV ads since September.

The candidates weren't the only ones spending on the race. Republicans looked at the First District as the best pickup possibility in Minnesota, and outside groups of different political and philosophical stripes dropped $1.1 million into the district. Nearly three-fourths was spent against Walz.

The National Republican Congressional Committee put more than $500,000 into the race, and the Democratic Congressional Campaign Committee invested nearly $270,000 to defend the seat.

Demmer and the Republicans focused their attacks against Walz on his vote supporting the federal stimulus bill, painting the law as a failure in creating jobs.

Republicans also seized on Walz's vote for climate change legislation, which upset some farmers who felt it would have harmed their business.

Walz played up his opposition to the Wall Street bailout in 2008, which has become unpopular politically.

A former National Guard member, he highlighted his record on veterans' rights, as well as making note of an endorsement from the National Rifle Association.

Demmer sought to play into anti-Democratic sentiment by criticizing Walz for supporting the health care bill, an argument with resonance in the First District, home of the nationally known Mayo Clinic in Rochester.

Jeremy Herb • 202-408-2723