In a fascinating twist, Republican Rep. Martha McSally has officially been named Arizona’s newest senator after losing a race for the state’s other Senate seat to Democrat Kyrsten Sinema in November. McSally will take over the seat vacated by Sen. Jon Kyl, who had previously been appointed to serve out a portion of the late Sen. John McCain’s remaining term.

Kyl recently announced that he’d step down from the Senate seat on December 31, spurring questions about whom Gov. Doug Ducey would ultimately pick for his replacement.

McSally — the first female fighter pilot to fly in combat and a top recruit of Senate Majority Leader Mitch McConnell — had long been seen as a key contender for the seat, although a post-election memo her campaign had compiled more recently left her chances in doubt. As the Washington Post’s Sean Sullivan reported, the memo sought to attribute part of her loss to Sinema to a slew of factors including voter antagonism toward President Donald Trump and was not particularly well-received among certain state Republicans.

Additionally, McSally saw some blowback during the state’s Republican primary, when she was simultaneously called out for distancing herself from McCain by members of his family while also criticized for being too much like him by Republicans in the party who are further to the right. A longtime moderate, McSally was seen as contorting her positions on issues including protections for DREAMers and a border wall, in order to please a more conservative base.

McSally appears to have weathered any residual controversy to secure the appointment, however.

The two-term Congress member, who currently represents Arizona’s Second Congressional District, will take over the Senate seat until 2020 — when voters will decide which candidate they’d like to stay on for the last two years of McCain’s term.

“I am humbled and grateful to have this opportunity to serve and be a voice for all Arizonans,” she said in a statement, obtained by the Arizona Republic. “I look forward to working with Senator-Elect Kyrsten Sinema and getting to work from day one.”

McSally marks the second historic senator the state will see in 2019. Prior to this year, Arizona had never had a woman senator, despite strong representation in its state legislature.

Starting next year, it will have two.