Katz is back!

The New York City Board of Elections declared Monday that Queens Borough President Melinda Katz narrowly topped her Alexandria Ocasio-Cortez-backed challenger, Tiffany Cabán, in the Democratic primary to become the county’s next district attorney by a margin of just 60 votes.

But the fight for the party’s nomination will continue Wednesday in Queens Supreme Court, where public defender Cabán plans to argue the BOE improperly excluded hundreds of ballots that could once again tip the scales in her favor.

“The parties — that were the subject of the litigation that’s coming up — were given full, fair, open and transparent access to every step of these proceedings,” said Board of Elections executive director Michael Ryan. “At the conclusion, the faith of the public will rest easy.”

The winner of the Democratic contest will become the heavy favorite to win the job in the November general election in the increasingly left-leaning borough.

The certified results showed Katz winning 34,920 votes, a razor-thin edge over Cabán’s 34,860.

“While it is everyone’s right to avail themselves of the judicial process, I urge all participants in this hard-fought election to come together and join me in beginning the hard work of reforming the criminal justice system in Queens,” said Katz in a statement.

Her campaign threw a “volunteer appreciation” party in Queens Monday night, just hours after the BOE made the results official.

Meanwhile, Cabán hopes to beat increasingly long odds by getting a judge to agree that the BOE improperly rejected some provisionally cast affidavit ballots — and wrongly had some votes discounted during the hand recount.

Election authorities previously identified 114 ballots that were cast provisionally by registered Democrats who failed to complete the affidavit to vote in the primary, but Cabán’s attorney Jerry Goldfeder refused to say Monday how many votes might be subject to the second argument.

Cabán shocked the city in June when she appeared to beat Katz, a veteran Queens politician, by 1,100 votes on primary night.

But the tables then flipped when the Board of Elections tallied the absentee ballots and many of the provisionally cast ballots, giving Katz the slimmest of leads — just 16 votes.

Cabán generated attention early in the race but appeared to sputter down the stretch as the first-time candidate struggled with the mechanics of campaigning.

But she mounted a furious sprint to the finish thanks to a flood of money and support from the Working Families Party and prominent progressives like Ocasio-Cortez, the social media-savvy freshman congresswoman.