The polls closed in New York City’s hotly contested mayoral primary election on Tuesday night and Eric Adams held a 10-point lead, but it is expected to be a few weeks before the vote count becomes official.

"Tonight all of us, we are on the precipice of gaining the keys to the prosperity of our city," he said, according to the New York Post.

Contender Andrew Yang, also a former presidential candidate, announced Tuesday night that he will end his bid for the job after coming in a distant fourth place.

"I am a numbers guy," he said. "And I am not going to be the next mayor of New York City based upon the numbers that have come in tonight. I am conceding this race."

It could be several days or even weeks before final results are officially determined in a race that will have major implications for the city’s recovery from the coronavirus pandemic and an ongoing crime wave.

A total of 13 Democratic candidates and two Republican candidates were on the ballot. The primary utilized ranked-choice voting, meaning that voters were permitted to rank up to five candidates in order of their preference. 

A final result may not be known until July, the New York Daily News reported.

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.

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

Top contenders included Yang, the tech entrepreneur best known for seeking the Democratic Party’s presidential nomination in 2020, and Kathryn Garcia, the former New York City sanitation commissioner. Maya Wiley, a prominent civil rights attorney, drew support from progressives, including Rep. Alexandria Ocasio-Cortez ahead of the vote.

Other notable Democratic candidates included City Comptroller Scott Stringer, former U.S. Secretary of Housing and Urban Development Shaun Donovan, former Citigroup executive Ray McGuire and nonprofit executive Dianne Morales.

The primary election followed a contentious series of debates dominated by questions about how each candidate would respond to a surge of gun violence and other crime in New York City. Candidates were also pressed on their plans to rebuild New York City’s economy and revitalize the education system during the ongoing recovery.

Wiley, Stringer and Morales were among the candidates who have pledged to cut police funding if elected to office. 

Republican primary candidates included "Guardian Angels" founder Curtis Sliwa and businessman Fernando Mateo.

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' Edmund DeMarche and the Associated Press contributed to this report.