JUNEAU, Alaska (AP) — U.S. Sen. Lisa Murkowski, a moderate Republican, has twice withstood challenges from more conservative factions of her party; more than a decade ago, she mounted a historical write-in campaign to beat a tea party favorite, and this year she won reelection after inflaming the ire of former President Donald Trump.

On Wednesday, Murkowski defeated fellow Republican Kelly Tshibaka, who was backed by Trump, to win her fourth term in office. Murkowski won the ranked choice election with 54% of the vote with help from independents and Democrats.

Murkowski didn’t make Trump a focus of her campaign, emphasizing instead her seniority, record of delivering projects and funding for Alaska, and willingness to work across party lines as she sought to build a coalition of support.

“Thank you, Alaska. I am honored that Alaskans – of all regions, backgrounds and party affiliations – have once again granted me their confidence to continue working with them and on their behalf in the U.S. Senate. I look forward to continuing the important work ahead of us,” she said in a short statement after she won the race.

Trump figured prominently in the race, especially after Murkowski both called on him to resign and then voted to impeach him after the Jan. 6, 2021, U.S. Capitol riot. In 2020, before that year’s election and before Tshibaka jumped into the Senate race, Trump announced plans to campaign against Murkowski following her criticism of him: “Get any candidate ready, good or bad, I don’t care, I’m endorsing. If you have a pulse, I’m with you!”

Trump later endorsed Tshibaka, which she credited with helping elevate her candidacy and name recognition. Murkowski’s impeachment vote and criticism of Trump were among the reasons state Republican party leaders cited last year in censuring her, further highlighting the moderate’s at-times fraught relationship with her own party.

Of the ten House members who voted to impeach Trump, six were up for reelection. Four decided to not seek reelection, and only two won their races. Of the seven Senate Republicans who voted to convict Trump at his impeachment trial, Murkowski was the only one on the ballot this year. Trump was not convicted in the Senate trial.

Murkowski is no stranger to tough races.

She eked out a win in 2004, winning the seat she was appointed to in late 2002 by her father, then-Gov. Frank Murkowski, who had held the Senate seat for two decades before that. She won the 2010 general election with a historic write-in campaign after losing her party primary to a tea party favorite Joe Miller.

This year’s elections in Alaska, though, was held under a new system approved by voters in 2020 that implemented open primaries and ranked vote in general elections. Under the new system, the top four vote-getters in a primary, regardless of party affiliation, advance to the general election.

Many saw the new system as favorable to a candidate like Murkowski, who referred to coalition building in a campaign as “kind of my strong suit.” The largest segment of registered voters in Alaska is independents.

The race also included Democrat Pat Chesbro, who ran a low-profile campaign, and Republican Buzz Kelley, who suspended his campaign after his fourth-place primary finish and endorsed Tshibaka.

Chip Wagoner, an independent voter, said he disagrees with Murkowski on issues like abortion; Murkowski supports abortion rights. But Wagoner said she listens, something that he said he doesn’t see a lot of in either major party.

“I think it’s critical that we elect people who are not so partisan that they don’t listen to the other side,” he said. He said that he was also “impressed that she stood up to Trump.”

Before the 2020 election Trump said that he would campaign against Murkowski after she’d levied criticism against him. Her impeachment vote was a point of contention raised by Trump in campaigning for Tshibaka.

“She voted to impeach me, and I did more for this state than any president in history,” Trump said to applause during a summer rally in Anchorage with Tshibaka and Republican Sarah Palin, whose House bid Trump endorsed. Palin also lost her race. Trump carried Alaska in 2016 and 2020.

Trump cited as accomplishments efforts that had been pushed for years by Alaska’s congressional delegation, including Murkowski, such as oil and gas lease sales in the Arctic National Wildlife Refuge and support for a road through a wildlife refuge to provide access to an all-weather airport for residents of an isolated community. The lease sales and potential land swap that could lead to a road have been mired in litigation.

Democrat John Hartle said that on his ballot he ranked Chesbro first and Murkowski second, ultimately expecting his vote to go to Murkowski. Kelley was the first candidate eliminated in the tabulation rounds of ranked voting conducted by state elections officials Wednesday. Chesbro was next, and more than 20,500 of her 29,078 votes went to Murkowski.

Hartle said that he wanted to send a message to Murkowski that there are “a lot of Democratic voters in the state” and to “encourage her to listen to what they have to say.”

A major concern for Hartle this election cycle was the nation’s democracy. Hartle, who is from Juneau, said that he found it “scary” that so many people promoted the falsehood that the 2020 presidential election won by Democrat Joe Biden was “stolen.”

Tshibaka acknowledged that Biden was president but said in a questionnaire from media outlets that there were “unresolved questions about what happened” in that election.

Jonathan Kreiss-Tomkins, a Democrat who did not seek reelection to the state House this year, said he ranked Murkowski first. He said he disagrees with her on some fiscal, tax and other issues. But he said something shifted for him “in the last six years, in the sort of Trump-era of the country and in this era where … truth and objectivity are being contested effectively as a political game.

“These are like very fundamental things,” he said. “And I think the luxury of disagreeing over certain issue areas or being an absolutist about political party, it’s like, we’re not in that time.”