A Republican propelled by President Trump and an African American Democrat powered by a wave of liberal energy won the nominations for governor of Florida on Tuesday, setting up a colossal fall showdown between two potent political forces in the country’s biggest swing state.

Trump’s preferred candidate, Rep. Ron DeSantis, decisively won the GOP nomination. Tallahassee Mayor Andrew Gillum, a liberal backed by Sen. Bernie Sanders (I-Vt.) and billionaire environmentalist Tom Steyer, claimed the Democratic nod in an upset. Both are 39, representing a generational shift, and defeated more moderate opponents.

Their victories instantly elevated the themes that have jolted and polarized the country during the Trump era — race, health care, immigration and the environment — to the political foreground of the third-most-populous state in the country and one that promises to be a battleground in the next presidential election.

Gillum, who defeated former congresswoman Gwen Graham, a centrist who led in pre-election polls, became the second African American gubernatorial nominee in the South this year. Democrat Stacey Abrams won the party’s nomination in Georgia in May. She is also facing a Trump-backed Republican, Secretary of State Brian Kemp. Another southern black Democrat, Mike Espy, is running for the U.S. Senate in Mississippi.

Addressing supporters Tuesday night, Gillum presented himself as a direct answer to Trump-style politics.

“We’re going to make clear to the rest of the world that the dark days that we’ve been under coming out of Washington, that the derision and the division that have been coming out of our White House, that right here in the state of Florida we are going to remind this nation of what is truly the American way,” he said.

Andrew Gillum won the Democratic nomination for governor of Florida on Aug. 28. He becomes the state’s first African American gubernatorial nominee. (Amber Ferguson/The Washington Post)

DeSantis, who is one of Trump’s most resolute defenders in Washington, beat state Agriculture Commissioner Adam Putnam, who had eyed the governor’s office for years.

DeSantis had tied his fate to Trump, who campaigned for him this summer. One of his ads showed him building a wall — of the border sort — out of blocks with one of his children and reading “The Art of the Deal” to another.

He signaled in his victory speech that he would continue to align himself tightly in the general election with Trump and his allies, and he listed a string of Trump accomplishments, including the nominations of two conservative Supreme Court justices and the cancellation of the Iran nuclear deal.

“I’d say that’s pretty good work for a year and a half, so let’s keep it going,” he said.

The contrasts in the primaries mirrored the choices that voters have faced across the country this year as they have picked nominees for the November midterms. In the GOP, voters have mostly sided with Trump-backed candidates.

In the Democratic Party, this year’s primary results have been less conclusive. At times, liberal upstarts like New York’s Alexandria Ocasio-Cortez and Nebraska’s Kara Eastman have upset establishment-backed opponents. On other occasions, more moderate Democrats have defeated left-wing challengers.

Gillum has embraced a “Medicare-for-all” health-care system and has said the government should “abolish ICE in its current form.” Graham, the daughter of former governor and U.S. senator Bob Graham, had built a moderate record during her sole term in Congress but failed to overcome the coalition of liberals and African Americans built by Gillum.

Sanders, who traveled to Florida this month to campaign for Gillum, congratulated him in a statement. “What has made Andrew’s campaign so powerful is that he’s not just working hard to win an election, he has laid out a vision for a new course for the state of Florida and our country,” Sanders said.

Gillum has faced questions about an FBI investigation that he has said appeared to focus on city government in Tallahassee and a colleague, but not him. “I have zero tolerance for corruption,” he said in a Washington Post podcast earlier this year.

Voters also went to the polls Tuesday in Arizona and Oklahoma. In Arizona, where the death of Sen. John McCain has sent many people into a state of mourning, Trump’s influence was felt in the closely watched Republican primary for Senate. While Trump did not pick a favorite, the three leading candidates aligned themselves closely with the president. Rep. Martha McSally, the winner, hardened her immigration stance as the race unfolded.

Ideological divisions roiled the Democratic primary for governor in Arizona, with former state education official David Garcia emerging victorious after campaigning on a platform of universal health care and replacing the Immigration and Customs Enforcement agency.

Tuesday also kicked off a marquee Senate race in Florida, as Sen. Bill Nelson (D) released his first television ad in anticipation of a bruising fight against Gov. Rick Scott, who easily won the Republican nomination. Nelson, who was unopposed on the Democratic side, pitched himself as a middle-of-the-road problem-solver.

“If you know who you’re fighting for and you’re willing to put the politics aside, you can get a lot done,” he says in the commercial. Some general election polls have shown Scott, a formidable fundraiser, leading Nelson.

Gillum’s nomination for governor could affect the concurrent Senate race, as the party’s enthusiastic base of liberal activists and donors pours money and manpower into the state.

With the unofficial post-Labor Day start of the general election just around the corner, both parties face a moment of reckoning with their nominees in the swing states and districts that could decide control of Congress and the occupants of the nation’s governor’s mansions.

Florida and Arizona factor heavily into those battles. Trump won both by single-digit margins in 2016. But demographic trends and rising anger with his presidency have given Democrats hopes of turning the states blue.

Republicans have controlled the Florida governor’s mansion for nearly two decades. But Democrats sense an opening this year, partly in anticipation of DeSantis as the Republican nominee.

“VOTE FOR RON!” Trump tweeted on Monday. He called DeSantis a candidate who is “Strong on Crime, Borders and wants Low Taxes.”

“It made all the difference,” said longtime Florida Republican consultant Mac Stipanovich, speaking of Trump’s endorsement. “It is a commentary on Trump’s influence with the Republican primary electorate that he could basically call the shot.”

Also in Florida, several House members faced primary challenges, including Rep. Darren Soto (D), who defeated former congressman Alan Grayson, one of the party’s most outspoken and controversial liberals; Rep. Al Lawson (D), who defeated former Jacksonville mayor Alvin Brown; and Rep. Stephanie Murphy (D), who defeated Chardo Richardson, the president of the region’s American Civil Liberties Union chapter.

Looking to November, Democrats are hopeful about winning three South Florida districts where Latino and suburban voters, once reliably Republican, fled the party in 2016. Their top target is the Miami-based 27th District, where GOP Rep. Ileana Ros-Lehtinen is retiring and where voters rejected Trump by 20 points.

Donna Shalala, who served as health and human services secretary under President Bill Clinton and later as president of the University of Miami, barreled into the primary and raised more than $1 million in just a few weeks. Shalala won the Democratic nomination and will face Maria Salazar, the Republican nominee.

In Arizona, Senate Republican leaders had hoped McSally, a former Air Force pilot and one of their top recruits, would advance from a bruising primary that has forced her to tack to the right and embrace Trump, whom she once criticized.

“I think she has the best chance of holding the seat. I worry that if she isn’t the nominee that we could well lose the seat,” Senate Majority Whip John Cornyn (R-Tex.) said before the race was decided.

McSally defeated hard-right osteopath Kelli Ward and former Maricopa County sheriff Joe Arpaio.

McSally will face Rep. Kyrsten Sinema (D), who has been running on a centrist platform. Polls show Sinema is in a strong position to compete for the seat in November. Some Republicans have grown nervous that McSally’s steps to the right, particularly in immigration, could come back to haunt her.

McSally said she welcomes a chance to campaign with Trump in the general election. Republicans are defending a 51-49 Senate majority, and the Arizona race is seen as a critical piece of the battle for control of the chamber.

In the Democratic gubernatorial primary, Garcia talked about creating statewide universal health care and “replacing ICE with an immigration system that reflects our American values.” He will face Republican incumbent Doug Ducey.

The nastiest Democratic race was in McSally’s 2nd Congressional District, where former congresswoman Ann Kirkpatrick competed with Matt Heinz, a doctor and former state legislator who lost to McSally in 2016. He refused to clear a path for Kirkpatrick and compared her desire to return to Congress to a “meth addiction.”

Republicans settled a crowded primary of their own, with Hispanic Chamber of Commerce leader Lea Márquez-Peterson leading in polls and fundraising.

In Oklahoma, businessman Kevin Stitt won Republican gubernatorial runoff and will face former state attorney general Drew Edmondson (D) in November.

A Republican runoff was also being decided in the conservative 1st Congressional District, which has been vacant since Jim Bridenstine left to lead NASA. Either former Tulsa County district attorney Tim Harris or businessman Kevin Hern would be the favorite in November.

Democrats were focused on the more moderate 5th Congressional District, where Kendra Horn has intrigued the national party and looked to get past retired law professor Tom Guild, who ran to her left.