Young black and gay candidates were heading for electoral breakthroughs this week, turning the public clamor for racial justice and equality into likely primary upsets in New York, Kentucky and Virginia.

Those results have revealed a resurgent left, which has pivoted from defeat in the Democratic presidential primary to a focus on down-ballot races. In safe blue seats, and in places where the party has tended to nominate moderates, a coalition of white liberals and nonwhite voters is transferring energy from the past month’s protest movements into challenges of the party’s establishment.

“Let’s allow this to be a moment where every single person in this district, and every single person in this country, feels like they are a part of our democracy,” said Jamaal Bowman, 44, a former middle school principal who declared victory over 16-term Rep. Eliot Engel (D-N.Y.). “You know what Donald Trump is more afraid of than anything else? A black man with power.”

Bowman’s likely win came during protests that upended American cities following the death of George Floyd, an unarmed black man who died in Minneapolis police custody a month ago. Potential wins for two openly gay candidates came a week after the Supreme Court ruled that gay and transgender workers are protected from workplace discrimination under the landmark 1964 civil rights law, a major victory for the LGBT movement.

The apparent victories of many of the candidates — the wait for hundreds of thousands of absentee ballots has delayed calls on the outcome — stretch from New York’s Westchester County to Virginia’s Blue Ridge Mountains.

In Virginia, Cameron Webb — an African American physician, former White House fellow and health policy researcher — easily won the Democratic nomination in a sprawling House district that includes the city of Charlottesville. In Kentucky’s Senate primary, black state legislator Charles Booker was running close with Amy McGrath, a retired Marine Corps fighter pilot and suburban mother backed by the national party.

And in New York, nonwhite candidates were poised to capture nominations for House seats in majority-white suburbs, gaining ground in the sort of races where party machines had long resisted change.

Engel, 73, chairman of the House Foreign Affairs Committee, called Bowman’s victory claim premature in a district that encompasses the northern Bronx and a southern swath of suburban Westchester County. But Bowman was already accepting congratulations from the national liberal groups that backed him.

Wins in many of the primaries would be tantamount to capturing the seat in the heavily Democratic districts.

And while these Democrats replacing Democrats will not be shifting the balance of power in the House, they represent a massive generational change that could pose a challenge to House Speaker Nancy Pelosi (D-Calif.) and disrupt the more tradition-supporting Congressional Black Caucus and Congressional Hispanic Caucus.

“People are beginning to look at black candidates not through the lens of electability, but through whether they’re the right person for the job,” said Stefanie Brown James, the co-founder of Collective PAC, which spent hundreds of thousands of dollars in ads across the three states voting Tuesday. “I’ve known Mondaire Jones since high school, and to see him ascend from being an NAACP youth leader to, potentially, a congressman, is just crazy.”

Jones, 33, an attorney and former official in the Obama Justice Department, held a primary lead in a crowded field vying to replace retiring Rep. Nita M. Lowey (D-N.Y.), chairman of the House Appropriations Committee. Lowey will turn 83 on July 5.

If he wins, Jones would be the first openly gay black member of Congress, representing a district that includes Rockland and northern Westchester counties — home to Bill and Hillary Clinton.

“For most of this race, much of Westchester County’s Democratic establishment doubted that I could win this election. And so I hope that these people will reconsider the next time they make assumptions about candidates like myself and our viability even as we outperform the competition by all conceivable measures,” Jones said in an interview Wednesday. “We have to cultivate diverse talent and support diverse talent and not push them to the side or marginalize them.”

Jones had the endorsement of Sen. Bernie Sanders (I-Vt.), the unsuccessful Democratic presidential candidate, and other leading liberals as he backed several of their priorities, including the Green New Deal.

“I was never running for Congress to make history, but the historic nature of this campaign is obviously not lost on me,” Jones said. “And the power of representation in particular is something I could have benefited from directly growing up.”

In another New York district, Afro-Latino state legislator Ritchie Torres, 32, also led a crowded primary field to fill the seat of retiring 15-term Rep. José E. Serrano (D).

Torres, who was 2 years old when Serrano first won his congressional seat, was the first openly gay elected official in the Bronx when he won a City Council seat. His father is from Puerto Rico and his mother is black.

In a Long Island district, where Republican Rep. Peter T. King is retiring, Jamaica-born Iraq and Afghanistan war veteran Jackie Gordon held a commanding primary lead, unlikely to be reversed by absentee ballots.

Bowman, Jones, and Torres all gained ground after the killing of Floyd sparked protests and calls for police restructuring across the country. That energy also reshaped 14-term Rep. Carolyn B. Maloney’s reelection bid, which was far too close to call Tuesday night.

After nearly 40,000 votes were counted, Maloney had just 42 percent of the vote against three challengers; Suraj Patel, who had lost to her handily in 2018, trailed by a few hundred votes, with thousands of absentee ballots left to count.

While Maloney, 74, holds the gavel of the powerful House Committee on Oversight and Reform, clout she did not have in 2018, Patel honed a pitch of generational change. The combination of the coronavirus and the mass protests gave him an opening to criticize Maloney’s past skepticism of mandatory vaccination, and her vote for the 1994 crime bill.

“It’s a change election, much more so than two years ago,” the 36-year-old Patel said in an interview. “The generational piece of this race is so much more persuasive to a lot of people, because the systems all around us are broken. It’s not abstract anymore, when 60 percent of coronavirus deaths in New York are in public housing.”

The results in New York came after years of recruiting and investment by the city’s left-wing activists, supercharged by the 2018 victory of Rep. Alexandria Ocasio-Cortez (D-N.Y.). The 30-year old congresswoman easily defeated a former CNBC anchor while endorsing Bowman and Jones.

She did not support Torres, but the shock of Ocasio-Cortez’s first win had helped groups such as Justice Democrats and the Working Families Party recruit more candidates and earn more media attention, crucial to winning races where the novel coronavirus had put a halt to traditional campaigning.

“It’s like B.C. and A.D. — before AOC and after AOC,” Torres said. “In the post-AOC world, incumbency is no longer an entitlement, no longer a guarantee of elected office.”

Pelosi has, so far, threaded the needle between the competing wings of her caucus, from the 30 Democrats sitting in districts Trump won four years ago to more liberal members of the Congressional Progressive Caucus.

Now, these newcomers might link arms with Ocasio-Cortez, who upset Joseph Crowley, a lieutenant in Pelosi’s leadership team at the time, to try to more aggressively push the caucus to the left on some issues.

Ocasio-Cortez has at times fought lonely battles over legislation, sometimes with only a few allies from her self-declared “squad” of four young female Democrats, and sometimes she’s the lone voice of opposition, as she was on the more than $2 trillion Cares Act in late March.

In those moments, leaders of the Progressive Caucus, after pushing Pelosi as far as they thought they could go, mostly fell in line behind the speaker’s legislative tactics. If the rising star from the Bronx can coax these potential allies to join her cause, they could become a bigger thorn in Pelosi’s side next year.

None of the Democrats defeated or replaced in New York were as conservative as Rep. Daniel Lipinski of Illinois, an antiabortion Democrat ousted by a primary challenge three months ago. But all of the challengers promised a shift to the left, and all linked themselves to protest movements that some Democrats had viewed warily.

“The power of social movements is essential, but insufficient, to secure victories that these cries from the street demand,” said Maurice Mitchell, the national director of the Working Families Party. “You need the power to govern, and you need to ensure that that power is accountable to social movements.”

As they voted on Tuesday, black voters who supported Kentucky’s Booker said they were confident that he could run competitively against Senate Majority Leader Mitch McConnell (R-Ky.).

Danyle Washington, 43, cast ballots for “BB” — Booker and Joe Biden, the presumptive Democratic presidential nominee — and said the state legislator would be a stronger candidate in November.

“He’s not changing minds of people who are racist,” Washington said. “I think he’s changing minds of people who are open.”

Athey Ajak, a 20-year-old college student, said he saw a strong connection between Booker’s candidacy and the protests that had transformed the country’s debate over policing and racial justice.

“All of this protesting,” he said, “means nothing if you don’t vote.”

Eugene Scott in Washington, Paul Kane in New Jersey and Joe Wood in Louisville contributed to this report.