Ilhan Omar is a member of the Minnesota House of Representatives

Minnesota state Representative Ilhan Omar, the nation's first Somali-American legislator, has won a crowded Democratic primary to replace Representative Keith Ellison in Congress.

Ms Omar's victory Tuesday all but ensures she'll set another historic mark as the first Somali-American in Congress. Minnesota's 5th Congressional District includes Minneapolis and surrounding suburbs that tilt heavily Democratic.

Meanwhile, Senator Tina Smith will face off against Minnesota state Senator Karin Housely after both won their primaries in the race to fill Al Franken's seat in the Senate.

Mr Franken resigned earlier in the year amid allegations stemming from the #MeToo movement, leading to the all-women face-off in November.

On Monday, Mr Trump endorsed the Republican frontrunner for the House seat in the 8th district, Pete Stauber. Democrat Rick Nolan retired from the position, leaving a tough five-way primary for the party. Mr Stauber has leaned heavily on a pro-Trump message and will hope it helps him breakthrough in November. Mr Stauber will face former state Representative Joe Radinovich

Elsewhere, former Minnesota Governor Tim Pawlenty's comeback bid fizzled in the Republican primary for his old job, as voters chose County Commissioner Jeff Johnson to face Democratic Representative Tim Walz in the governor's race.

Mr Walz had been considered a top contender in the three-way primary to replace outgoing Democratic Governor Mark Dayton, despite losing his party's nod in early June. And Mr Johnson was a longshot, given Mr Pawlenty's unparalleled name recognition and fundraising from two terms as governor and a brief presidential campaign in 2012.

The stakes are high for both parties. For Democrats, the governor's office could be their only lever of power if they don't take the state House later this year. Republicans see a chance at seizing complete control of state government in the traditionally blue state.

Please wait a moment for the live blog to load