Republican voters renominated two of their party’s best-known figures for the Senate on Tuesday, setting up grueling general-election contests for Arizona’s John McCain and Florida’s Marco Rubio in a year when the GOP presidential nominee, Donald Trump, has upended the political scene.

Both Rubio, who ran for president this year, and McCain, the 2008 GOP presidential nominee, have sought to avoid clashing with Trump, lest they alienate Republican voters they will need to win in November. But both now face well-financed Democratic opponents who are determined to yoke them to their party’s unpopular standard-bearer.

In Florida, Rubio easily beat businessman Carlos Beruff and will face his Democratic challenger, Rep. Patrick Murphy, in November. With 98 percent of precincts tallied, Rubio won 72 percent of the Republican vote, and Murphy dispatched fellow congressman Alan Grayson with 59 percent of the Democratic vote.

In Arizona, McCain faced a vigorous primary challenge from former state senator Kelli Ward, who attacked McCain as too willing to compromise with Democrats. But she struggled to raise the money and amass the widespread support needed for a serious challenge. McCain held a 20-percentage-point lead in early returns when the Associated Press projected his victory late Tuesday. He will face Rep. Ann Kirkpatrick, who ran unopposed for the Democratic nomination.

Other key congressional races were decided Tuesday in the two states.

In a banner House primary, Rep. Debbie Wasserman Schultz (D-Fla.) beat college professor Tim Canova, garnering 57 percent of the vote, with 99 percent of precincts reporting. Canova raised $3.3 million in mostly small-dollar donations from supporters of Sen. Bernie Sanders’s presidential campaign who were aggrieved over Wasserman Schultz’s handling of the presidential race in her former role as Democratic National Committee chairwoman.

Elsewhere in the state, Rep. Corrine Brown (D-Fla.), facing a 22-count federal corruption indictment and a redrawn district, became the fifth House incumbent to lose a primary this cycle. Former state senator Al Lawson won the Democratic nomination in her stead.

In Florida, political watchers scoured primary returns in a bevy of House districts that were been redrawn just months ago by a court-ordered redistricting. At least seven of the state’s 27 House seats will have new representatives in January, and as many as eight more could see turnover.

Hotly contested primaries developed to fill the open House seats of Murphy and Grayson, as well as those vacated by the retiring Gwen Graham (D), Ander Crenshaw (R) and Curt Clawson (R).

Many of those races have been marked by the familiar national dynamic that pits the party establishment against insurgents. In the redrawn 2nd District, surgeon Neal Dunn eked out a victory over lawyer Mary Thomas, who had garnered support from national conservative groups such as the Club for Growth.

A similar dynamic was at play in the Jacksonville-area 4th District, being vacated by Crenshaw, where former county sheriff John Rutherford beat Hans Tanzler III, who is a lawyer, and Lake Ray, who is a state lawmaker. Both had sought to portray Rutherford as insufficiently conservative for the safely Republican seat.

In the Atlantic-coast 18th District left open by Murphy, wounded veteran Brian Mast was buoyed to victory by national conservative groups over Rebecca Negron, whose husband is president of the state Senate. But in the 19th District seat vacated by Clawson, Francis Rooney, former U.S. ambassador to the Holy See and a major GOP fundraiser, won the party’s nomination over Chauncey Goss, son of former congressman and CIA director Porter Goss; and Dan Bongino, an ex-Secret Service agent who twice failed in Maryland congressional bids.

In the Miami-area 26th District, Democrats tangled for the right to challenge incumbent Carlos Curbelo (R), who is at the top of national Democrats’ target lists. Former congressman Joe Garcia narrowly beat businesswoman Annette Taddeo, who had won the support of the Democratic Congressional Campaign Committee.

And in the Orlando-area 9th District, a safely Democratic district, state Sen. Darren Soto beat back an attempt by Dena Grayson — wife of the incumbent — to fill her husband’s seat. Should Soto win in November, he would become the first person of Puerto Rican descent to represent Florida in Congress.

Just a few months ago, the Senate primaries in Florida looked to be marquee contests as each party maneuvered to fill the seat that Rubio pledged to vacate. But in June, Rubio abruptly reversed course under pressure from national Republicans who were afraid that the seat was in jeopardy — perhaps along with the Senate majority. Beruff, a real estate developer who embraced the presidential candidacy of Donald Trump, stayed in the race but failed to catch fire with Florida voters after spending millions of his own dollars.

On the Democratic side, the battle between Grayson and Murphy looked as if it would turn into a proxy fight between progressive and centrist Democrats.

But Grayson’s claim as a liberal firebrand was tarnished by a major ethics complaint and domestic violence reports, while Murphy has largely weathered unflattering scrutiny of his résumé to build a significant lead in recent polls. Earlier this month, Murphy stopped running ads, signaling that he is conserving his war chest for Rubio.