MINNEAPOLIS — Democrats in Minnesota collected most of the victories they were expected to in Tuesday's election, plus some they weren't.

Tim Walz and Tina Smith won the governor and Senate races, confirming polls that had them leading most of the way. And Angie Craig and Dean Phillips knocked off Republican incumbents to flip two House seats, helping their party grab control of the chamber.

In a race that was up in the air right up to election day, Keith Ellison was elected attorney general after three months dogged by an allegation that he abused his former girlfriend.

In perhaps the biggest surprise of the midterm, Democrats rode strong turnout to overcome an 11-seat deficit and grab control of the state House.

A bright spot for the GOP was a victory in a special election for a single state Senate seat that prevented Democrats from taking that chamber.

A rundown:

U.S. HOUSE

Four Minnesota congressional races attracted national attention, and millions of outside dollars, because of their potential to affect the balance of power in the House.

In the suburban 3rd District, Democratic businessman Dean Phillips defeated Republican Rep. Erik Paulsen. Phillips formerly ran his family's liquor company and is a grandson of the late advice columnist Abigail Van Buren, better known as Dear Abby. In the suburban/rural 2nd, Democratic former medical device company executive Angie Craig unseated Republican Rep. Jason Lewis, who narrowly beat her in 2016.

In northeastern Minnesota's 8th District, Pete Stauber, a St. Louis County commissioner and retired Duluth police officer, defeated former state representative Joe Radinovich in a race that was seen as Republicans' best chance nationwide of picking up a Democratic seat. The seat opened up with Rep. Rick Nolan's retirement.

In southern Minnesota's 1st District, Republican Jim Hagedorn, a former Treasury Department official and son of a former congressman, was locked in a tight race against Democratic Iraq War veteran Dan Feehan, who was acting assistant secretary of defense for readiness in the Obama administration. The seat opened up when Walz ran for governor.

History was made in the solidly Democratic 5th District, where state Rep. Ilhan Omar became the first Somali-American — and one of the first two Muslim women — elected to Congress. Omar defeated Republican Jennifer Zielinski in the Minneapolis-area district.

U.S. SENATE

Gov. Mark Dayton appointed Smith, his lieutenant governor and former top aide, to fill the seat that Franken resigned under pressure in December amid a growing sexual misconduct scandal. She defeated Housley for the right to complete rest of Franken's term, which runs through 2020.

In Minnesota's other U.S. Senate race, Democrat Amy Klobuchar easily captured a third term over little-known state Rep. Jim Newberger.

LEGISLATURE

Republican Speaker Kurt Daudt conceded that his party would lose the majority in the Minnesota House that it has held since 2015. The final margin of Democrats' majority was unclear as votes were still being tallied early Wednesday. Democrats needed to flip 11 seats to take control of the chamber.

But Republicans kept control of the state Senate in a special election in a rural St. Cloud-area district. GOP Sen. Michelle Fischbach resigned the seat earlier this year to be sworn in as lieutenant governor, leaving the Senate deadlocked at 33-33. Minnesota's 66 remaining Senate districts aren't on the ballot until 2020.

GOP Rep. Jeff Howe, who has represented half of the district since 2013, defeated former Sartell mayor and county commissioner Joe Perske. With two weeks to go, more than $1 million of mailers and political spending poured into the race.

ATTORNEY GENERAL

Ellison's victory over Republican Doug Wardlow, who was a virtual unknown, preserves a Democratic lock on the attorney general's office that dates back to the 1970 election. The abuse allegation had put the office in play for the first time in half a century.