Nikil Saval, a writer and community organizer, has defeated Pennsylvania State Sen. Larry Farnese in a closely watched Democratic primary, the Associated Press projected, in a major victory for Philadelphia progressive activists.

With 100% of precincts reporting votes cast in person, Saval led with 68% of the vote over Farnese, who was first elected to the seat long held by Vince Fumo in 2008. But only about 15,000 votes had actually been counted as of Wednesday, with more than 40,000 mail ballots still to be tallied. The early race call suggested high confidence that mail ballots in the race would be similar to in-person votes.

If Saval’s margin holds up, Tuesday’s primary could turn out to have been a brutal election for incumbent Democratic lawmakers in Philadelphia. The AP on Wednesday also projected losses for State Reps. Maria Donatucci and Roni Green. And at least two more House incumbents were in tight races, though the unprecedented volume of mail ballots in Tuesday’s election — some of which arrived only Wednesday — meant early returns from in-person voters could ultimately prove misleading.

Saval had yet to declare victory Wednesday in the Senate race, with his campaign citing the ballots still to be counted.

“We feel really good right now,” said Amanda McIllmurray, Saval’s campaign manager. “We want to make sure every vote is counted before we decide whether we won or lost.”

“We put out a message that resonated with people of all demographics," McIllmurray said. “People are really hurting right now. Even before the crisis of COVID-19 and before the uprisings and police crackdowns, people were hurting. That’s why we’re seeing what we’re seeing.”

Mark Nevins, a Farnese campaign consultant, also urged caution in declaring a winner before the mail ballots were counted. “Given the uncertainty of this election cycle and the number of outstanding votes yet to be counted it’s far too early to know what the outcome is," Nevins said.

The First Senate District stretches north and east, from Philadelphia International Airport through South Philadelphia, and Center City to Fairmount and Port Richmond.

The contest between Farnese and Saval was the latest battle in the ongoing war between the old and new schools of Philadelphia politics. Saval’s win would be a remarkable symbolic victory for the new left over an incumbent well-known for his own progressive bona fides.

Farnese’s campaign spent about $180,000 on cable television commercials, about six times as much as Saval spent on TV, according to the ad-tracking firm Advertising Analytics. Farnese raised more than $830,000 in the last 18 months, more than twice the $305,000 Saval reported raising since he announced his candidacy in December.

Neil Oxman, a longtime political consultant in Philadelphia, said money didn’t seem to beat a motivated base of organizers. “What mattered most yesterday was the hard-core volunteers that [Saval’s] group had in those wards in an election where turnout was an aberration,” he said. Despite Farnese’s 11 years in office, Oxman said, he probably didn’t enter the race with a huge incumbent advantage.

“Some people are operating under the premise that Farnese was some overwhelming favorite,” Oxman said. “It’s not Andrew Cuomo against a mythical primary opponent. The guy’s a state senator who has limited name recognition. If Saval wins, it’s not as if he was an impossibility from the start.”

Establishment political support was also not entirely behind Farnese. Local 98 of the International Brotherhood of Electrical Workers, whose leader, John Dougherty, had long feuded with Farnese’s predecessor Fumo, backed Saval. And the district, spanning parts of Bella Vista and South Philadelphia, has a growing younger and more progressive constituency. A string of wins for progressive candidates in the city in recent years has only bolstered that base.

In other down-ballot city races, Regina Genell Young led Donatucci, the incumbent Democrat in the 185th House District, with 66% of the vote and 81% of precincts reporting results Wednesday afternoon. Donatucci has represented the district — which includes parts of Southwest Philadelphia and Delaware County — since 2011.

In the West Philadelphia-based 190th District, challenger Amen Brown, CEO of the Overbrook Beacon Community Empowerment Center, led with 49% of the vote with 90% of precincts reporting results. Green, the incumbent, had 29%, ahead of two other challengers.

In another West Philadelphia district, longtime State Rep. James Roebuck Jr. was narrowly trailing progressive Rick Krajewski, according to preliminary results.

And in Center City, government relations consultant Marisa Shaaban led incumbent State Rep. Brian Sims. The vote tally was also close in the 175th District, where State Rep. Mary Isaacson was leading three challengers in early results. The district stretches from Queen Village to Kensington.

Mail ballots were still being counted in all races.

-Staff writers Jonathan Lai and Chris Brennan contributed to this article.