ATLANTIC CITY, N.J. (AP) — A Democratic city councilman who was sharply critical of Atlantic City’s Republican mayor as New Jersey instituted a state takeover has won his mayoral primary.

Frank Gilliam won an overwhelming majority of absentee votes. That helped him overcome a 100-vote voting-machine deficit to rival Councilman Marty Small in Tuesday’s election.

The Associated Press called the race for Gilliam on Wednesday.

Gilliam will now face Republican Mayor Don Guardian and independent Joseph Polillo. The race unfolds as the state maintains control over Atlantic City’s political power and physical assets.

Gilliam was sharply critical of Guardian about the November takeover. As he declared victory late Tuesday night, Gilliam signaled that he will use the takeover as a weapon against the Republican mayor.