Queens district attorney hopeful Tiffany Cabán far outperformed Melinda Katz in the latest campaign fundraising period — and far outspent her on legal fees amid their fierce recount fight.

Insurgent Democrat Cabán pulled in $207,437 between July 2 and July 12. She spent $85,000 on lawyers — including $40,000 for Stroock & Stroock & Lavan, the firm of her high-powered election lawyer Jerry Goldfeder.

Katz, the Queens Democratic Party candidate, collected just $36,000 during the same period. She spent much more — $325,000 — though all but $50,000 of that went to consulting firms Red Horse and Connective Strategies Inc. for past campaign expenses.

Cabán, a public defender in Manhattan, and Katz, Queens’ borough president, are locked in a tight fight for every vote cast in the June 25 Democratic primary. Katz holds a 16-vote edge, but victory hinges an all-or-nothing manual recount of some 91,000 ballots that began last Tuesday and is expected to take two weeks.

The latest campaign filings, made public Tuesday, shed light on the shifting fortunes of the two candidates hoping to replace the late longtime DA Richard Brown.

Katz started the race with more than $1.4 million in her campaign coffers, a sum that’s dwindled to $43,000. Cabán, who began with a little over $250,000, now has $100,000 left to spend.

Big and Small Donations Alike

The 31-year-old lawyer, who got a crucial endorsement from Rep. Alexandria Ocasio-Cortez (D-The Bronx, Queens), raised $203,000 from 5,112 individuals during the 10-day period, THE CITY’s analysis of her fundraising found. The other $4,000-plus came in the form of non-monetary contributions.

Some $18,780 raised by Cabán came from 620 people with Queens addresses. Nearly 30% of Cabán’s haul poured in from big donors, most of whom live outside of New York.

Patty Quillin, the wife of Netflix co-founder and CEO Reed Hastings, gave $20,000 during the filing period. Quillin, who is listed in Board of Elections filings as living in California, had previously donated $35,000 to Cabán’s campaign.

Another Californian, Mark Heising, the founder of investment firm Medley Partners, gave $20,000 to Cabán. Heising’s wife, Liz, is the daughter of retired hedge fund billionaire James Simons, a major contributor to Democratic party political action committees nationwide.

Barrie Nichols, a U.S. Virgin Islands resident and the controller of a Houston-based venture capital firm, contributed $20,000.

In addition to the $40,000 for Goldfeder’s firm, Cabán paid $30,000 to election lawyer Renée Paradis, who previously worked for Bernie Sanders. Two other law firms were paid a total of $15,000 for helping with the recount.

Eyes on the Prize

Cabán also has drawn 165 lawyers who volunteered to help with the recount effort, according to her campaign. Overall, her campaign spent $142,000 over the period covered by the most recent financial filing.

Meanwhile, two of Katz’ election attorneys, Michael Reich and Frank Bolz, are working pro bono. She’s paid $20,000 so far to former state senator Martin Connor, a top election lawyer who recently joined her campaign.

The $36,000 Katz raised during the most recent filing period came from 25 contributions — including 16 from individuals. Most individual donors had addresses in Queens. The largest donation of $7,500 came from Gandolfo Difiore, an Astoria-based developer.

Veteran political strategist George Arzt said legal spending is a wise investment in the close race.

“Your eye has to be on the prize, and the prize right now is the vote count,” Arzt said. “Melinda and Cabán are spending on the best election lawyers because their victories hinge on it.”

As for Connor and Goldfeder, he said, “they have been there before. They’re the people you want down in the trenches with you.”

Sign up for “THE CITY Scoop,” our daily newsletter where we send you stories like this first thing in the morning.

Want to republish this story? See our republication guidelines.