Democratic Council Member Justin Brannan declared victory in his competitive re-election bid for Brooklyn’s 43rd District seat on Tuesday, shortly after the New York City Board of Elections (NYCBOE) wrapped up its tally of absentee ballots in the race. His victory keeps his long-standing bid for council speaker alive.

Figures released by Brannan’s campaign show he beat Republican Brian Fox by more than 400 votes. With Brannan’s margin of victory above half a percentage point, Brannan narrowly averts a days-long automatic manual recount.

“We won! Despite being up against a red wave driven by misinformation, lies, and one of the dirtiest campaigns southern Brooklyn has ever seen - we prevailed,” Brannan said in a statement posted on Twitter.

Fox, who ran on both the Republican and Conservative party lines, issued a statement that appeared to concede the race, saying his campaign “came up short in the end.”

“[W]e managed to come within one percentage point of victory, something none of the so-called experts predicted,” Fox said in his statement. “I am enormously proud of the strides my campaign made, and I look forward to remaining active in New York City politics.”

The NYCBOE won’t certify the results, and all those in the general election, until November 30th.

Read More: After General Election, All Eyes Shift To NYC Council Speaker’s Race

The results mark a significant turn for Brannan, a former punk rocker first elected to the council in 2017 to represent working class neighborhoods in Bath Beach, Bay Ridge, Bensonhurst, and Dyker Heights. On Election Night, Fox was ahead by 255 votes, making absentee ballots cast in the race critical in determining a winner.

Counting began on Monday at a warehouse in Brooklyn, with representatives from Fox and Brannan’s campaigns present for the vote. Nearly 900 ballots were counted that day, with Brannan ahead by 132 votes, according to his campaign. On Tuesday, all 1,600 valid absentee ballots were counted.

Brannan is considered among the top contenders in the race for speaker, which intensified shortly after the general election wrapped up. For the last few years, Brannan has laid the groundwork in his quest for speaker, specifically with new members of the City Council. During the primary, Brannan crisscrossed the city to stump on behalf of candidates who went on to win the general election.

But his slim victory appeared to weaken his chances for speaker, in which six others are also vying for the powerful post. If Brannan wins, he will be the first speaker to hail from Brooklyn.

Despite the narrow victory in the general election, Brannan’s win beat back some gains for the GOP, which kept three council seats while flipping Brooklyn’s 48th Council District, where Republican Inna Vernikov beat Democrat Steven Saperstein. The race for the 19th Council District in northern Queens between Democrat Tony Avella and Republican Vickie Paladino remains too close to call. Despite Democrats returning more absentee ballots in that race, Paladino has already declared victory.

Read More: NYC Republicans Poised To Pick Up City Council Seats

“We made major gains,” Liam McCabe, a campaign spokesperson for Fox, said of the GOP victories while also chastising Brannan, saying he focused on the speaker’s race over his constituents.

In January, the full council is expected to select a speaker shortly after new members are sworn in.