WASHINGTON ― Sen. John McCain (R-Ariz.) is projected to win his re-election bid, having fended off challenges presented both by his opponent, Rep. Ann Kirkpatrick (D-Ariz.), and GOP presidential nominee Donald Trump.

Early in the campaign, McCain looked to be in the fight of his political life, with some polls putting the centrist, pro-gun Kirkpatrick within a point or two of the veteran incumbent.

The ascendence of Trump complicated the senator’s campaign, forcing a lawmaker long regarded as a maverick to toe the party line and embrace a toxic character who had insulted McCain’s war service.

McCain never gave Trump a strong endorsement, but while facing tea party challengers in his primary, he insisted he’d back his party’s nominee.

McCain was forced to dodge questions about Trump all summer and fall, and skipped his party’s nominating convention. He didn’t abandon Trump until recordings emerged that revealed the GOP nominee had boasted about sexually assaulting women.

Still, Kirkpatrick ran a lackluster campaign and never inspired much excitement, even in a state with a large Latino population and in a year when her party had nominated a woman for president. She polled significantly lower than Hillary Clinton throughout the campaign.

McCain’s win sends him to his sixth term in the United States Senate, where he promised during his campaign to block any Supreme Court justices named by Clinton.