Eric Adams' early success in the race for the Democratic New York City mayor nomination dealt a heavy blow to the city's teachers union, which campaigned against Adams for supporting charter schools.

The polls closed in New York City’s hotly contested mayoral primary election on Tuesday night. Adams held a 10-point lead, but it is expected to be a few weeks before the vote count becomes official. The primary was conducted via ranked-choice voting, meaning that voters were permitted to rank up to five candidates in order of their preference. 

The United Federation of Teachers had endorsed city Comptroller Scott Stringer and told members to leave Adams and former presidential candidate Andrew Yang off their ballots, according to CBS New York.

ERIC ADAMS TAKES 10-POINT LEAD, YANG CONCEDES NYC MAYORAL RACE AS PRIMARY POLLS CLOSE

"Both Andrew Yang and Eric Adams are supported by hedge fund billionaires and people who don't care about equity and who don't have the best interests of New York City's children at heart," UFT President Michael Mulgrew said in a statement to the local outlet.

Mayoral candidate Eric Adams mingles with supporters during his election night party, late Tuesday, June 22, 2021, in New York. (AP Photo/Kevin Hagen)

The New York Post endorsed Adams, partially because of his stance on charter schools.

"On education, he speaks common sense," the Post Editorial Board wrote in May. "While so many Democrats rail against charter schools, Adams knows that they provide a life-changing opportunity for poor minority kids — and a living challenge to our public schools to improve. He has pledged to push the state to raise the charter school cap."

"As for public schools, Adams shows justified frustration with the state of our educational system and the bureaucrats who run it," the Post Editorial Board continued.

While the teachers union lobbied against Adams, pro-charter school groups supported him. Jenny Sedlis, executive director of the pro-charter StudentsFirstNY, took a break to head up a political action committee supporting Adams, Politico reported in May.

NYC MAYORAL PRIMARY: VOTERS HEAD TO POLLS AMID SURGING CRIME, RACIAL RANCOR

"We need to identify those charter schools that are failing and those are the schools we need to replace with the schools who are doing a good job. The goal is to scale up excellence," Adams said according to Politico. "We have too many charter schools and district schools that are not meeting the standards that are needed … to talk about caps and non-caps is just the wrong conversation. What we're capping is excellence."

Adams, a former captain in the New York City Police Department and the current Brooklyn borough president, was considered the front-runner heading into the primary vote, according to an average of recent polls. He has pledged to lead a crackdown on gun violence and reform law enforcement tactics even as he rejected calls among some contenders to "defund" the police.

CLICK HERE TO GET THE FOX NEWS APP

The winner of the Democratic primary is considered the presumptive favorite to become the next mayor of New York City after November’s general election. Registered Democrats outnumber Republicans seven-to-one in New York City.

New York City’s current mayor, Democrat Bill de Blasio, could not run for reelection due to term limits.

Fox News' Thomas Barrabi, Edmund DeMarche and the Associated Press contributed to this report.