Rep. Melissa Hortman, the new leader of Minnesota House Democrats, ran for her seat twice — and lost twice — before finally prevailing in 2004. “Third time was the charm,” she said last week in an interview.

In a few weeks, Hortman, a Brooklyn Park attorney and lifelong resident of the northwest Twin Cities suburbs, officially takes over as House minority leader. Her persistence in winning her way into the Legislature may end up being a model of sorts for her House DFL colleagues, who find their ranks depleted after an election that saw them fall even further into the minority.

“One thing I learned is elections are about more than just the candidates in the race,” Hortman said. “There are national factors at play, statewide factors at play that have an impact. And a wave election is completely indifferent to the quality of the candidate.”

Aided by the surprising strength of President-elect Donald Trump in many parts of Minnesota, state House Republicans grew their majority to 75 seats compared with 57 for the DFL. She thinks two years of Trump’s presidency could turn voters back toward Democrats, noting the DFL needs to flip 11 seats in 2018 to be back in charge of the House. “We won 19 seats in 2006,” she said.

A married mom of two college students, Hortman, 46, has a flair for sarcasm that is likely to come in handy in a job that involves almost daily sparring with members of the opposing caucus.

Hortman grew up in Spring Lake Park and Andover and graduated from Blaine High School in 1988. It was there she first witnessed an education funding dynamic that drove her early engagement in politics. “We spent a lot of time hating the southwest metro because they offered classes like Japanese and economics and AP everything, and we were struggling to have the basics,” she recalled. When she told a guidance counselor she wanted to attend Harvard, the response was: “Kids from Blaine don’t go to Harvard.” (She later applied anyway, was rejected, and went to Boston University instead.)

After earning a University of Minnesota law degree, Hortman had early success in legal fights against housing discrimination, which put her on the radar of DFL activists. She was general counsel for a time at the business her father owned, John’s Auto Parts in Blaine, and more recently worked for the Hennepin County attorney.

In addition to education equity, Hortman focused at the Capitol on transportation funding. She was the DFL’s floor manager on the day in 2008 that the House overrode then-Gov. Tim Pawlenty’s veto of a gas tax increase, which she calls her proudest day in the Legislature.

“I don’t believe in flushing the next two years down the toilet because the other guys are in charge,” she said, adding she hopes to work with Republicans on college affordability, economic opportunity and improved preschool and child-care access.

“Where we’re going to lay down on the railroad tracks is if the Republicans try to do things to take Minnesota backward or hurt particular groups of people,” Hortman said.