“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 has 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,” Mr. Gillum told jubilant supporters in Tallahassee.

In Arizona, Republican primary voters chose the establishment favorite, Representative Martha McSally, to replace Mr. Trump’s most outspoken G.O.P. critic in the Senate, Jeff Flake, in a contest that evolved into a test of which candidate could embrace Mr. Trump most snugly. In the Arizona governor’s primary, Democrats again chose an outspoken progressive over a pragmatist.

[Read key takeaways from Tuesday night’s results.]

Lifted by a June endorsement from Mr. Trump, Mr. DeSantis overwhelmed Adam Putnam, the state agriculture commissioner and one-time favorite for the nomination, taking 57 percent of the vote to Mr. Putnam’s 37 percent with all precincts reporting, according to The Associated Press.

But the surprise of the night was Mr. Gillum’s victory over Ms. Graham, the daughter of governor-turned-senator Bob Graham. Propelled by an endorsement from Senator Bernie Sanders and financing from Tom Steyer, George Soros and Collective PAC, a group dedicated to electing African-Americans, the 39-year-old mayor surged at the end of the campaign to upset Ms. Graham, the establishment pick.