BROOKLYN (CN) — Hours before New Yorkers handed Democratic president hopeful Hillary Clinton and her likely Republican challenger Donald Trump highly coveted wins in their quest for the White House on Tuesday, a voting scandal erupted in the state's largest city.

New York City's comptroller, who acts as the city's chief financial officer, announced his office will audit the Board of Elections after it confirmed more than 125,000 Brooklyn voters were removed from the rolls, miscategorized by party and shut out of the Democratic process.

On Wednesday afternoon, New York State Attorney General Eric Schneiderman announced that he too has begun an investigation into "alleged improprieties in yesterday's voting by the New York City Board of Elections."

In a letter to Michael Ryan, the board's executive director, New York Comptroller Scott Stringer talked of a "deep concern" over "problems and irregularities" as New Yorkers hit the polls on Primary Day.

Among them: "faulty ballot scanners and polling locations that opened late (or not at all) to poorly staffed polling sites and voters whose registrations were seemingly purged from the rolls without effective notification."

"There is nothing more sacred in our nation than the right to vote, yet election after election, reports come in of people who were inexplicably purged from the polls, told to vote at the wrong location or unable to get in to their polling site," Stringer said.

"The people of New York City have lost confidence that the Board of Elections can effectively administer elections and we intend to find out why the BOE is so consistently disorganized, chaotic and inefficient," the letter continued.

With four upcoming elections throughout the city this year, he added: "we don't have a moment to spare."

"As I am sure you would agree, whether you are a Democrat or a Republican, all New Yorkers deserve an electoral system that it is free, fair and efficient — not one riddled with chaos and confusion," Stringer said.

Fourteen Long Island Democrats filed a federal class action late Monday claiming their party affiliation was mysteriously missing, and they challenged New York's closed primary system. Such a system shuts out anyone who doesn't identify as a Republican or Democrat, they said.

New York City Mayor Bill de Blasio also chimed in and called for a fix to the vexing voting issues just hours before he took the stage at Clinton's victory rally at the Sheraton Hotel in Manhattan's Times Square neighborhood Tuesday night.

He called on the city's Board of Elections to reverse the purge, and applauded Stringer's announcement to audit the process before upcoming city elections in June.

"These errors today indicate that additional major reforms will be needed to the Board of Elections and in the state law governing it," he said. "We will hold the BOE commissioners responsible for ensuring that the board and its borough officers properly conduct the election process to assure that voters are not disenfranchised."

Mayor de Blasio continued: "The perception that numerous voters may have been disenfranchised undermines the integrity of the entire electoral process and must be fixed."

In a statement released Wednesday afternoon, New York's attorney general explained why he believes an inquiry into Tuesday's primate is warranted.

"Yesterday, New Yorkers turned out in impressively high numbers to vote for the nominees in their respective parties," Schneiderman said. "By most accounts, voters cast their ballots smoothly and successfully. However, I am deeply troubles by the volume and consistency of voting irregularities, both in public reports and direct complaints to my office's voter hotline."

Schneiderman said the hotline received more than 1,000 complaints about voting issues on Tuesday.

"If necessary, we will initiate inquiries in additional areas of the State where voting irregularities appeared unusually high," the attorney general said. "Voting is a cornerstone of our democracy, and if any New Yorker was illegally prevented from voting, I will do everything in my power to make their vote count and ensure that it never happens again."

A spokeswoman with the BOE did not respond to a request for comment Wednesday.