It’s good sometimes to shoot high. With all precincts reporting, Porter, a Sen. Elizabeth Warren protégé invested with the hopes of the progressive movement, ended with 19,453 votes. It was enough, putting her roughly 2,600 ahead of her main Democratic challenger David Min. With late vote-by-mail and provisional ballots, she’s likely to approach the target and move on to the general election in California’s 45th Congressional District, facing Republican incumbent Rep. Mimi Walters. Porter declared victory at 2 a.m. local time, saying, “We moved one step closer to taking our fight to Washington.”

TUSTIN, Calif. — As the returns began to come in Tuesday night in California, Katie Porter ventured into the war room at her campaign headquarters, where the walls were covered with mailers and precinct maps. On one side was a giant number: 22,000.

She did it with the aid of EMILY’s List, but also from a couple of progressive groups that made this a threshold race: Democracy for America and the Progressive Change Campaign Committee. They both targeted the seat as a signature skirmish in the battle for “what it means to be a Democrat in this country,” as Porter put it. DFA made 43,000 calls into the district and both sent staffers to knock on some of the 100,000 doors the campaign hit.

Min, a former Sen. Chuck Schumer staffer, Center for American Progress fellow, and assistant professor at Porter’s school, UC Irvine, had the backing of the state party and the New Democrats, a Wall Street-friendly bloc that supplied 27 of the 33 House Democratic votes in favor of the recent bank deregulation bill. Porter was the only House candidate endorsed by Warren, her former teacher and co-author.

But that wasn’t the whole story. Progressives beat back the establishment in New Mexico, where a Native American woman defeated an Albuquerque prosecutor with backing from No Labels, a coalition of ultrawealthy donors who work to tip Democratic primaries to the right. In California, it was the bizarre Orange County races that got much of the coverage, but the House race there that offered the cleanest choice between the two ideological poles was the one in the 45th.

The 45th didn’t get much attention from national reporters because there was no chance of a Democratic lockout in the top-two primary, a possibility that made coverage irresistible in other California districts. Walters was the only Republican running, meaning a Democrat was guaranteed to make it into the general election. Sure enough, the mainstream press has re-run its “ establishment strikes back ” narrative because the party managed to get a Democrat into each of the general-election races in key seats, as well as win races in New Jersey and elsewhere.

Adam Green, co-founder of the PCCC, called Porter’s win a victory for the Warren wing of the party. The Massachusetts senator was prominent in the Porter campaign’s ads and mailers. “I went out and knocked on doors, and I was shocked by the number of people who cited Elizabeth Warren,” said Green. “So many people said they were going by who they trusted, and they trusted Sen. Warren.” PCCC tied Min to the New Democrats in what Green described as an opening salvo in an effort to make the brand “toxic” in primaries.

Warren hasn’t stuck her neck out much in primaries this cycle, but the Porter race could demonstrate her strength in suburban districts like Orange County. That would be more true if Porter had managed to knock off Walters, who got 53.2 percent of the primary vote. The Cook Political Report lists the race as Lean Republican. But that may be underselling the power of Porter’s message in what will be a nationalized race against Trump policies in November. She’s running directly against the Trump record of deregulation and tax cuts, in the birthplace of the conservative movement. And she has a shot.

The New Democrats suffered another defeat in a race that pitted the two camps of the party against each other in San Diego’s 50th District. Ammar Campa-Najjar, who ran as a progressive with the backing of Justice Democrats, PCCC, and DFA, beat Josh Butner, endorsed by the New Democrats and backed by the Wall Street-friendly Rep. Joe Crowley, the chair of the House Democratic Caucus, who is facing his own challenge from the left back home in the Bronx and Queens from Alexandria Ocasio-Cortez.

Campa-Najjar faces incumbent Rep. Duncan Hunter in the general election, an uphill climb as Republicans won more than 60 percent of the votes in the primary. But a grand jury is hearing testimony related to an investigation of Hunter for misuse of campaign funds, and if an indictment comes down between now and November, the race becomes that much more in play.

In New Mexico’s 1st District, Deb Haaland, Antionette Sedillo Lopez, and prosecutor Damon Martinez squared off. Sedillo Lopez, a civil rights attorney, had the backing of some national progressive groups, such as Justice Democrats and the Working Families Party, as well as Latino Victory, which spent heavily on her. Martinez, meanwhile, got a big boost in spending from the Super PAC tied to No Labels. But Haaland, who is poised to become the first Native American member of Congress and had the support of the Congressional Black Caucus PAC and environmental group 350.org, beat both of them.

EMILY’s List, which backs pro-choice women, spent heavily against Martinez, but didn’t endorse either woman. That tactic proved effective in advancing a woman to the general election, where Haaland is expected to win easily. (On Wednesday, the group officially endorsed Haaland.)

In northern New Mexico, the Working Families Party’s top recruit for the night, Susan Herrera, pulled off a landslide upset in a state legislative race that the local press called “the end of a political era.” The WFP spent more than $60,000 on the race, and she knocked off 25-year incumbent Rep. Debbie Rodella in an area that is solidly Democratic but thought to be socially conservative. “I’m kind of amazed that we did it,” Herrera said of her grassroots campaign in her victory speech. Rodella’s close ally Rep. Carl Trujillo was also knocked out by a progressive challenger, as was Rep. Bealquin “Bill” Gomez. The WFP’s Rob Duffery called the string of wins “seismic, bringing about a major sea change in the balance of power in the New Mexico state legislature.”

The establishment was also dealt a blow in San Francisco, where business-friendly candidate London Breed came out on top in the first round of voting. But the city uses a ranked-choice system, in which voters rank candidates on their ballot instead of voting for just one. If no one gets a majority of votes in the first round, next-preference votes are counted until a candidate gets most of the votes. The left had split its votes between Mark Leno and Jane Kim, giving Breed a lead with 36 percent to Leno’s 26 percent and Kim’s 21.5 percent in the first tally. Without ranked-choice voting, that would have been the end of it, and Breed would have been declared the victor. But with ranked-choice votes, the bulk of Kim’s support shifted to Leno, putting him on top.

The establishment did indeed notch its share of wins. Machine boss Jeff Van Drew won the nomination in a New Jersey district that is a prime pickup opportunity for Democrats, besting two progressives, despite his ties to the National Rifle Association and broadly conservative politics. And New Jersey’s Sen. Bob Menendez, fresh off a bribery trial that ended in a hung jury, won the Democratic nomination to return to the Senate.

Incumbent Sen. Dianne Feinstein easily beat challenger Kevin de León, though he did well enough to eke into the general election, which was his only goal as he conserved scarce resources for November. De León can now hope for some support from labor, which backed him but would have spent millions in the fall to stop Antonio Villaraigosa, a Democrat running for governor with tens of millions in backing from charter school proponents. Villaraigosa failed to make the runoff, meaning labor can now shift its focus to de León, along with the state’s House races.