With five days left before the August 23rd primary, a wave of last-minute money has been flooding in to help leading candidates locked in a heated battle to win the 10th congressional district.

While a lot of it is coming from outside sources hoping to steer the race's outcome, the bulk of the money is coming from an individual candidate who is largely self-funding his campaign.

Former federal prosecutor Dan Goldman, who became the presumptive front-runner after winning an endorsement from The New York Times, saw the biggest influx of cash to his campaign by far this month.

Goldman, the richest candidate in the race, has now put $4 million of his own money into the race. He wrote checks totaling $2 million in August after loaning his campaign $2 million the prior month, according to federal campaign finance filings. He also received help from a super PAC called Tzedek PAC, which spent $11,000 on get-out-the-vote services this month, filings show.

The race to win the newly drawn district, which covers lower Manhattan and parts of northwest Brooklyn, has been among the most crowded and closely watched primary contests in New York. Altogether, 12 candidates are running for the open seat. The outside money from deep-pocketed super PACs comes as early voting is underway in a primary that’s expected to produce low voter turnout, making advertising a central focus in the waning days of the election.

On Thursday, Politico reported that a super PAC aimed at Latino Democratic voters announced that it was spending $500,000 in digital and TV ads promoting City Councilmember Carlina Rivera, who is among the race's top four polling contenders. It is the single largest expenditure ever for the super PAC, which is called Nuestro PAC.

The money will go toward a 15-second digital ad in Spanish and English and another 30-second TV ad in English. The ads are airing on both broadcast and cable TV.

This is the first TV ad buy for Rivera, who has raised more than $638,000 in contributions. The 1199SEIU super PAC also spent $50,000 this week on a pro-Rivera digital ad.

Another leading candidate, Assemblymember Yuh-Line Niou, saw $250,000 in ad spending from a super PAC opposing her candidacy, according to recent filings. The curiously named NY Progressive PAC, headed by Jeff Leb, was formed this month and has been focused on Niou, whom many see as the most progressive of the top-tier candidates. Niou has the backing of the Working Families Party, a progressive third party.

Leb has previously been involved in other super PACs on the state and city level that have targeted progressives. The WFP gave $150,000 to Niou’s campaign this month.

Rep. Mondaire Jones, who is running in the race despite currently representing parts of Westchester and Rockland counties, also received help from a super PAC. Filings show the Opportunity NY super PAC spent over $72,000 in direct mailings on Jones' behalf.

Neal Kwatra, a Democratic strategist who had worked on ex-Mayor Bill de Blasio’s campaign before he dropped out of the race, argued that the rush of spending comes too late in the race.

“All this late money and late coalescing could have and should have happened earlier,” he said. “I’m skeptical of the impact of late money when thousands of voters have likely already voted or at the very least have clarity on who they want to vote for.”

Correction: A previous version of this story misstated the biggest source of funding in the race. The story has also been updated to clarify that the Working Families Party is its own party.