Republican Councilmember David Oh’s election party had a funeral vibe on Tuesday night, even as it became increasingly clear that he would be victorious.

Two seats on Philadelphia City Council are reserved for a minority party which, in this overwhelmingly Democratic town, has traditionally meant they go to Republicans. But this time, the insurgent Working Families Party picked up one of the two seats, leaving five Republicans to duke it out over the other.

Many in Philadelphia City Hall had already begun penning Oh’s political obituary when he came in last place at the Republican primary, with a mere 6,325 votes. But, as a result of the Philadelphia Republican Party’s disorganized strategy, it was Oh — who is unpopular with the traditional leadership — who came out on top.

“I’m an independent-minded Republican. I’m not tied to the traditional Republican establishment,” said Oh. “While I’m being targeted by the Working Families Party, I’m also being targeted by those Republican groups that are upset with me.”

Oh is a persistent critic of the Philadelphia Parking Authority, which is controlled by Republican operatives and is seen as a source of patronage jobs for party loyalists.

He also attributed his victory to a more diverse voter base than his Republican opponents.

“If you look at this room, we have whites, we have people from the Northeast, Center City, we Have Democrats, Asians, we have Muslims, we have African Americans, we have LGBTQ [people],” said Oh. “If you look at who’s in my room, versus who’s in their room, you are going to see a very different type of room.”

Oh racked up 49,700 votes on Election Day, beating out his closest Republican competitor — fellow Councilmember Al Taubenberger — by 5,616 votes.

Oh out-performed Taubenberger outside the Republican bastion of the Northeast, according to analysis from the blog Sixty-Six Wards. He did especially well in Center City and the strong turnout neighborhoods of the Northwest.

“He worked hard, and he campaigned in areas of the city where Republicans don’t get a lot of votes,” said Michael Meehan, chair of the Philadelphia Republican Party.

Oh’s campaign signs are visible on small businesses throughout West Philadelphia’s commercial corridors, in Chinatown, and South Philadelphia east of Broad Street. Councilmember Jannie Blackwell encouraged Democrats to vote for Oh in advance of the election.

Republican political consultant Albert Eisenberg is no fan of Oh, but he said that the race shows how out of touch the local party is with many constituencies in Philadelphia.

“The most obvious lesson is that we need more diverse candidates,” said Eisenberg, who was the communications director for the Philadelphia Republican Party during the 2016 election cycle. “It speaks to the GOP’s need to engage with diverse populations. If it’s true that a lot of his supporters were Asian Americans from across Philadelphia, that speaks well of him.”

In City Council, Oh plays the role of the perennial gadfly, clashing with Democratic colleagues and flooding the chambers with angry supporters on a semi-regular basis.

Earlier this year, he organized a campaign involving masses of supporters coming to City Council for weeks to push for investigations into the city’s Department of Human Services. The public testimony in support of Oh’s desire to investigate the city agency stretched on week after week, elongating Council sessions until Council President Darrell Clarke capitulated and moved Oh’s resolution forward.

The effort was typical of Oh’s legislative track record. It bred ill-will among his colleagues, but his stubborn persistence got the legislation through anyway. Many grumbled, on background, that Oh was merely seeking revenge on DHS because the agency had looked into an incident where he accidentally broke his son’s collar bone during martial arts practice. (Oh denied any connection.)

The legislation is also unlikely to have any effect on DHS or how it operates. Instead, it just creates another special committee in a system already drowning in such provisional bodies.

Many of the other legislative efforts Oh has championed haven’t gone anywhere. His efforts to audit the parking authority failed in a vote before the full Council, while his attempt to return control of the agency to the city died in committee. Oh’s work to pass anti-squatting legislation ran afoul of legal aid and tenants’ rights groups, who feared that his legislative language created huge loopholes that could be exploited by landlords. (The law got amended by a Democratic member almost as soon as it went into effect.) A bill that would have required Council approval for increases in property tax reassessments also went down to defeat.

“My question is, what has David Oh accomplished on City Council? I think the answer is nothing,” said Eisenberg.

In the coming session, Oh will be working in a City Council that has moved substantially to the left. He is one of only two remaining Republicans. The other is Brian O’Neill, who just won his 11th term. With four new Councilmembers, most of them progressives, Oh will surely have plenty of opportunities to play the gadfly.

“The Democrats in City Council are going to be under pressure to move much further to the left,” said Oh. “That would make my job as a Republican much more difficult.”