SALT LAKE CITY — Utah’s Mia Love was tabbed as a rising star in the GOP when she became the first black Republican woman in Congress with her 2014 victory.

But she became the latest Republican incumbent to fall in the midterm election’s Democratic wave that has seen more than three dozen Republican-held seats flipped across the country.

Ben McAdams, a Democratic mayor of Salt Lake County, defeated Love by fewer than 700 votes in a back-and-forth race that took two weeks to sort out in deep-red Utah, according to final results released Tuesday.

“Mia Love lost because she ran in the shadow of Donald Trump.”

Love had a built-in advantage with Republican voters outnumbering Democrats nearly three-to-one in the mostly suburban Salt Lake City district, but she never seemed to catch on with voters the way other Republican incumbents have in the state, said Damon Cann, a political science professor at Utah State University.

McAdams, 43, touted himself as a moderate, and not a typical Democrat, in a pitch that seemed to resonate in the district where nearly four in 10 voters are independents. He also benefited from record voter turnout that was driven in part by a medical marijuana ballot proposal that spurred progressive voters to the polls, Cann said.

Love, 42, tried to walk a tightrope regarding her support for President Donald Trump in a state that elected him 2016 but where the mostly-Mormon electorate has long been uncomfortable with his brash style and his comments about women and immigrants.

She tried to distance herself from Trump on trade and immigration. She highlighted the times she stood up to the president, like when Trump used an expletive to describe her parents’ home country of Haiti. But she backed Trump on the GOP-supported tax reform and appealed to voters to keep the House of Representatives in Republican hands.

Trump didn’t appreciate her approach, calling her out by name in a news conference the morning after Election Day, where he also bashed other Republicans who he said lost because they didn’t fully embrace him.

“She seemed to struggle a little bit more how to strike that balance without losing too many votes,” Cann said.

Jill Hanauer, a Denver-based Democratic strategist, said Love couldn’t shake the association with Trump despite her efforts.

“You can’t have it both ways. It was a little too late,” Hanauer said. “Mia Love lost because she ran in the shadow of Donald Trump.”

Love said through a campaign spokeswoman that she won’t discuss the race until a news conference Monday, saying only in a statement that she had planned to call McAdams and thanking voters for participating in the process.

She didn’t concede or congratulate McAdams, but she also didn’t signal that she would challenge the results. During the race, she sued a county to halt votes, but a judge threw out the lawsuit. Love finished about 20 votes short of being able to request a recount in a race where about 269,000 votes were cast.

It’s unknown if she’ll seek a return to Congress. She was mayor of a small Utah town before winning the U.S. House seat.

This is the second time she has lost a bid for Congress by a razor thin margin. In her first run in 2012, Love lost to incumbent Democrat Jim Matheson by 768 votes. She went on to defeat Democrat Doug Owens in 2014 and again in 2016.

For McAdams, it’s a victory that validates his reputation as an emerging political force in Utah. He becomes the first Democratic member of Utah’s congressional district since 2014 when longtime Rep. Jim Matheson retired after seven terms.

“This race was about connecting with Utah,” McAdams said.

McAdams is an attorney who graduated from Columbia Law School and practiced in New York before returning to his home state of Utah. He has been a political figure in the state for a decade. He was elected as one of the few Democrats in the GOP-dominated state Legislature in 2008 and successfully ran for the Salt Lake County mayor’s seat four years later.

McAdams said during the campaign he would not support California Rep. Nancy Pelosi as House Speaker and insisted he would be able to work with the president. He has already signed a letter along with 15 other Democrats vowing to oppose Pelosi.

He sharply criticized Love’s support for the GOP-backed tax overhaul and Trump’s policies and said she had not been available enough to her constituents at town halls. Love pushed back hard, saying the tax overhaul has been good for people in Utah and defending her approach of meeting with voters in smaller groups, on the phone or online.

The result of Utah’s election — where voters not only elected Democrat McAdams but passed medical marijuana and Medicaid expansion — show that Mormon voters aren’t quite the monolithic a voting bloc as some think. An estimated two-thirds of the state’s 3 million residents belong to The Church of Jesus Christ of Latter-day Saints, which openly opposed the pot ballot measure.

“Mormon voters are like all voters, they look at the person, not the party. They look at the principles and they look at the policies and how it affects their lives and their family’s lives and their communities,” Hanauer said.

Associated Press writer Lindsay Whitehurst contributed to this report.