State Senator Bill Perkins is going back to the New York City Council.

The longtime Harlem lawmaker pulled off a win Tuesday in a special election to replace Inez Dickens, who won a seat in the state Assembly back in November.

Perkins won about one-third of the vote in a crowded field, according to the unofficial results from the Board of Elections.

Perkins was certainly the heavyweight in this race. He had by far the most name recognition as a longtime politician. But his history in government was also used against him at times in this contest. He faced attacks for being a career politician.

Perkins had the support of City Hall and Mayor Bill de Blasio. 

Perkins was competing against eight other candidates for the Council seat in a district that has undergone some tremendous changes in recent years, with gentrification and rising housing costs a near-constant concern for many longtime residents. 

Perkins was in Harlem Tuesday night to celebrate with his supporters.

"I'm very happy. It's great to be able to go back to the City Council and be able to serve the people of the city of New York," Perkins said.

Turnout is traditionally low in special elections, and the fact that this one came on Valentine's Day meant that candidates likely had an even tougher time turning out supporters. There were only about 10,000 people who came out to vote in this election. 

The winner of the special election will have to run again this fall to win a full term, so the victory is relatively short-lived.

Perkins' state Senate seat will now become vacant. Another special election could be called to fill that seat.