Democratic Senate candidate Kyrsten Sinema has been elected in Arizona over Republican Martha McSally to become the state’s first female senator.

Her win flips a longtime Republican seat and narrows the GOP’s majority in the upper chamber.

Sinema, a three-term congresswoman, overcame attacks on her more liberal record as an Arizona state legislator and committed to a bipartisan approach in a race that hinged on issues such as health care and illegal immigration.

McSally, a freshman member of the House, lost the race after abandoning the moderate profile she had nurtured in her 2014 congressional race and allying herself with President Trump.

The former Air Force combat pilot adopted an aggressive tone, accusing Sinema of supporting treason over her 2003 remark that it was “fine” if a radio host who was asking her a question joined the Taliban.

Sinema won by 38,197 votes, and the Associated Press projected her as the winner Monday. She will replace Sen. Jeff Flake (R-Ariz.).

It was unclear what will happen to the state’s other Senate seat, which is currently held by Republican Jon Kyl. Kyl was appointed to replace the late Sen. John McCain (R-Ariz.) and has not commited to serving past this year.

It is possible Republican Gov. Doug Ducey appoints McSally to the seat.

After last week, only one surprising state hasn’t elected a woman to Congress

There are multiple barriers at play

The Lily live-painted a mural to reflect this year’s record number of first-time female candidates. See it here.

On election night, we painted in feathers of an eagle to represent the winners