Working Families Party’s Kendra Brooks clinched a Council seat in a historic first for the city.

Democratic and Republican leaders in Philadelphia woke up the day after Election Day to a major upset to the established order on City Council — and neither party felt like the big winner.

That’s because there’s a third party in town.

With a decisive margin over her nearest rival, Working Families Party candidate Kendra Brooks clinched one of the two City Council seats reserved for candidates from a minority political party.

“Pure money.” Ask Democratic City Committee Chairman Bob Brady what led to Brooks’ unprecedented citywide win, and that’s his answer. “Everybody had the same message,” Brady told Billy Penn. “Everybody supports families.”

The morning after Election Day, the leader of the Philly Democrats was claiming it was only the Republicans who got hurt.

Indeed, Brooks’ victory was a major setback for the local GOP, which long viewed the pair of non-majority at-large Council seats as guaranteed real estate. Councilmember Al Taubenberger conceded he’ll be cleaning out his office before the end of the year, while Councilmember David Oh will hold onto the other minority-party chair for his third term.

It wasn’t all sunshine in the land of the Dems.

The long-dominant party machine was rattled by Brooks’ candidacy. Progressive leaders like Councilmember Helen Gym, state representatives and a small army of committee people endorsed the Working Families Party contender.

And Brooks leaned into it. Her campaign pushed for votes from registered Democrats, arguing that the math of breaking party lines would not hurt the establishment candidates’ chances.

In the leadup to Nov. 5, Chairman Brady roundly condemned the idea, saying it was stealing votes.

During campaign season, the Philly Democrats even mulled expulsion for committee members and ward leaders who openly backed Brooks over the party’s official nominees. Critics pointed out that some Democratic ward leaders historically sold their endorsements to Republican candidates or non-endorsed Democrats — often without repercussions. Recently, outgoing Councilmember Jannie Blackwell broke the rules by boosting Republican Oh to her fellow Democrats in West Philly.

Brooks ran on policies that have gained popularity on the populist left both locally and nationally, including rent control and abolishing the 10-year tax abatement. And her push for office did benefit from an independent arm of the national Working Families Party, which spent hundreds of thousands of dollars on her behalf.

Her campaign rejected Brady’s characterization that the victory was dependent on outside financial aid.

“Kendra Brooks won this campaign because of an unprecedented coalition of labor unions and community groups across the city,” said Arielle Klagsbrun, Brooks’ campaign manager. “People knocked on thousands of doors across the city.”

It’s not like the Democrats actually lost the Council battle: all five at-large nominees won their seats with ease.

Turnout was up this year over past municipal elections, and Brady acknowledged that the Democratic nominees for Council at-large got a roughly even spread of votes despite Brooks’ insurgency. Gym did better than her peers by about 10,000 votes. Brady chalked it up to good ballot position.

Gym, who campaigned heavily for Brooks, said the election results speak for themselves.

“Whenever Chairman Brady is ready, I look forward to discussing with him the ways in which the Democratic Party and the city’s progressive movement can come together,” Gym said Wednesday. “Democrats are stronger when we work together — not against one another.”

A similar coda was echoed on the GOP side, which came out worse for wear.

Michael Meehan, chairman of the Republican City Committee, said he was upset by the electoral losses that beset his party across the Philadelphia region.

What happened? The GOP director pointed to infighting and dissent. “The problem is everybody went off on their own direction,” Meehan told Billy Penn. “It was all about ‘me.’ They wanted to edge out each other.”

In this case, “they” is the five Republican nominees for City Council at-large. The party endorsed all five, despite knowing only two seats are realistically up for grabs. “We had incumbent at-large council people who thought we shouldn’t endorse anybody else except them,” Meehan said.

How will the city’s second-largest political organization recoup its losses?

“I have no idea what we’re going to do,” Meehan said. “It’s one day at a time.”