U.S. Sen. Tina Smith beat Richard Painter, once the ethics chief in a Republican White House, in the DFL primary election Tuesday, setting up the state’s first U.S. Senate race with two women nominees.

State Sen. Karin Housley, who won the Republican nomination, will face Smith in the fall. “It’s inspiring for all young women out there that they can make a difference,” Housley said of the historic matchup.

Smith agreed. “It is a year when women feel particularly enthusiastic about stepping into the public arena, and I think that’s a good thing,” she said in an interview.

Two women who won primaries Tuesday in Wisconsin also will square off in that state’s U.S. Senate race. A record-breaking 19 women have won major-party nominations for the U.S. Senate this year, according to Rutgers University’s Center for American Women in Politics.

The Minnesota winner on Nov. 6 will finish the final two years of former DFL Sen. Al Franken’s term. He resigned in January amid sexual misconduct allegations. The race is crucial; Senate Republicans have a one-vote edge.

Smith’s victory was “a testament to the trust that Minnesota voters have in Tina to represent their interests,” DFL Party Chairman Ken Martin said in a statement.

Sen. Tina Smith

Chris Hansen, director of the National Republican Senatorial Committee, said in a statement that Housley “has what it takes to end left-wing Democrat Tina Smith’s brief career” in the Senate.

Sen. Amy Klobuchar won the Democratic nomination easily over four little-known opponents. In her bid for a third term, she’ll face state Rep. Jim Newberger of Becker, who has served three terms in the state Legislature. He defeated three Republican candidates in the primary.

Smith attributed her win to the fact that she “really listened to people.” She’ll employ the same strategy against Housley, she said. “The way elections are won in Minnesota is by talking to people and sharing what’s on their minds,” Smith said. “It sounds so simple, but it really is the thing that works.”

Housley said she’ll continue in the fall campaign to work hard and talk about jobs, the economy, trade issues’ effect on farmers, and immigration. “I will continue to support our elders,” she added.

She’s confident about her chances against Smith. “I am going to win,” she said.

Smith, 60, was appointed to the seat by Gov. Mark Dayton, whom she had served as lieutenant governor since 2015. Before that, she was the DFL governor’s chief of staff. She was endorsed by the DFL.

Housley, 54, is from St. Marys Point. She was elected to the Minnesota Senate in 2012 and in 2014 lost a race for lieutenant governor.

Painter, 56, who announced in April that he was leaving the Republican Party, is a University of Minnesota law professor. He was the chief ethics lawyer for President George W. Bush from 2005 to 2007.

Painter said his campaign helped call attention to ethics issues and to single-payer health care, which he endorsed. “We got a lot of attention around the country,” he said in an interview. He’ll resume teaching, Painter said. Asked if he’d consider running for office again, he said, “I don’t know. I’ll think about it.”

Voters interviewed at the polls Tuesday said their decisions in the Smith-Painter race turned on support for his animosity toward President Donald Trump — whom he said should be impeached — or doubts about whether his DFL conversion was genuine.

In late July, the DFL’s Martin publicly questioned whether Painter is actually a Democrat. Martin described Painter’s candidacy as “a craven act of desperation” because he is out of sync with the Republican Party. At the time, Painter said the DFL assault proved he was “a true threat to win this election.”

West Foster, 24, of Minneapolis, who works for a nonprofit group, voted for Smith. “I vote as far left as I can, and I’m not too impressed with Republicans — whether they say they are or not,” he said.

Paul Nelson, 50, a self-employed contractor in Minneapolis, was tempted by Painter, but he voted for Smith. “I’m a party guy,” he said.

When Housley and Smith meet in November, Trump’s policies and the senator’s record will be the top issues.

Smith has pledged to “stand up” to Trump. However, she has said she doesn’t think voters “want to hear us only talking about what we don’t like about this president.”

Housley has tried to establish some distance between her views and style and those of the president. For example, she said this summer that she disagreed with his decision to separate immigrant families.

Painter’s candidacy forced Smith to focus on wooing DFL voters. Meanwhile, GOP-endorsed Housley — who faced two candidates in the primary — made Smith her sole target.

Housley made frequent references to the “failed Dayton-Smith administration,” citing MNsure and the beleaguered vehicle registration system.

Cook Political Report, which handicaps campaigns, rates the race as a likely Demo­cratic win. So do Inside Elections and the University of Virginia’s Center for Politics. All three groups are nonpartisan.

The fall campaign is sure to become an expensive national battlefield, with outside TV ads flooding the airwaves and national interest groups’ money flowing into the race.

As of June 30, Smith had raised $4.8 million and Housley had collected $1.8 million.

Retired nurse Patricia Cohen, 75, voted in Minneapolis for Smith and Klobuchar because of their support for abortion rights. “There’s an assault on women’s privacy and the right to plan their families,” she said. “For me that’s one of the defining issues of our time.”

Kerry Riley, 41, a photographer and wardrobe stylist from Minneapolis, said her vote for Smith was less vital than showing up to vote — especially in the current political climate. “You have to,” she said.