In the latest test of the electorate, primary voters in seven states picked nominees on Tuesday. The results included a stunning defeat of the fourth-ranking Democrat in the House and victories for progressive candidates in several races. There also were key victories for candidates backed by President Donald Trump.

The next round of primaries — and another chance to check on the mood of voters ahead of November’s midterm elections — are in August.

Here are some takeaways from Tuesday’s key races:

Incumbent ousted

In the night’s most shocking upset, House Democratic Caucus Chairman Joseph Crowley was defeated by 28-year-old first-time candidate Alexandria Ocasio-Cortez. Ocasio-Cortez is a Democratic Socialist and a former organizer for Bernie Sanders’ presidential campaign.

Ocasio-Cortez started her campaign, she said, because she felt the diverse Queens and Bronx-based district should be represented by a progressive and Latina woman rather than a white man. Her victory over a 10-term incumbent with his eye on the speaker’s gavel has echoes of former Republican Majority Leader Eric Cantor’s surprise defeat by Rep. Dave Brat four years ago.

Crowley had never faced a tough primary challenge, but this low-turnout race was a critical test of the progressive grassroots ability to organize. Ocasio-Cortez, who supports Medicare-for-all and abolishing Immigration and Customs Enforcement, is expected to win against any Republican opponents in November, which would make her the youngest woman elected to Congress.

Crowley is the first Democratic incumbent and third overall to lose reelection in a primary this year, but two other New York representatives faced tougher-than-expected challenges from more progressive candidates. Rep. Yvette Clarke got about 1,000 more votes than 30-year-old challenger Adem Bunkeddeko, and Rep. Carolyn Maloney got less than 60 percent of the vote against Suraj Patel.

Maryland governor

Former NAACP President Ben Jealous, another Bernie Sanders-backed candidate, beat establishment choice Rushern Baker to win the Democratic nomination for governor in Maryland. Jealous ran on a progressive platform that included legalized marijuana and free college.

Jealous would be the first African-American governor of Maryland if he defeats incumbent Republican Gov. Larry Hogan in November. The last Republican governor to win reelection in the state was Theodore McKeldin in the 1950s.

South Carolina governor runoff

Less than 24 hours after President Trump rallied in South Carolina to support incumbent Gov. Henry McMaster, the governor won his runoff with about 54 percent of the vote. McMaster was one of the first statewide officials to back Trump’s 2016 presidential campaign and took over the governor’s mansion when Trump appointed former Gov. Nikki Haley as U.N. ambassador. In the five-way primary earlier this month, McMaster garnered just 42 percent of the vote.

New York’s 11th congressional district

Incumbent Rep. Dan Donovan, another Trump-backed candidate, easily fended off a comeback bid by ex-con Michael Grimm, who represented the Staten Island-based district until 2015, having pleaded guilty to felony tax fraud a month earlier. Democrats got their chosen candidate Max Rose in this target district.

Utah senate

Former Republican presidential nominee and Massachusetts Gov. Mitt Romney easily won the GOP nomination for Senate in Utah, garnering 73 percent of the vote. Romney’s victory over state Rep. Mike Kennedy comes 24 years after he mounted his first campaign for public office, an unsuccessful challenge to a different Kennedy — Sen. Ted Kennedy of Massachusetts (no relation). Utah hasn’t been represented by a Democrat in the Senate since 1977 so Romney is all but guaranteed to win in November.

Colorado governor

Rep. Jared Polis won a four-person Democratic primary hoping to succeed Gov. John Hickenlooper. The five-term congressman would be the first openly gay man elected governor in history. He faces Republican Walker Stapleton in November. Stapleton, who easily won the GOP nomination, is hoping to be the second Republican elected governor of Colorado in the last 40 years.

Big money

Wine entrepreneur David Trone finally got the win he was seeking in a crowded, eight-person Democratic field in Maryland’s 6th congressional district. The owner of Total Wine & More spent more than $10 million of his own money on the campaign, more than 11 times the second-place finisher.

The victory was a bargain for Trone, who spent more than $13 million on his losing congressional campaign — in a different Maryland district — two years ago. He’ll face defense contractor Amie Hoeber in November. The seat is currently held by Democrat John Delaney, who is retiring to run for the Democratic nomination for president in 2020.

Toss-up New York House districts

Democratic voters picked nominees in three competitive House races in New York that the party is hoping to take back from Republican control in November: