Low-polling Democratic presidential hopefuls drew in far less cash in the past three months than their more prominent rivals and spent almost all the money they raised trying to jump-start their campaigns — a precarious sign for their ability to survive a lengthy primary fight.

Twelve Democratic candidates spent more than 80 percent of the money they raised in the second quarter, according to new federal filings made public Monday night. The vast majority of them registered at 1 percent or less in the latest national polls.

Their lackluster fundraising and heavy spending highlight a growing gap between the candidates at the top of the polls and the rest of the hopefuls, portending a difficult third quarter that could winnow the field.

The Democratic presidential hopefuls now face greater pressure to ramp up their fundraising in the notoriously challenging summer months of July and August, and greater stakes for their performances at the second Democratic primary debate at the end of this month.

The Federal Election Commission filings released Monday reflect the campaigns’ fundraising from April 1 through June 30. Those with big hauls reported their figures before Monday’s filing deadline.

The top raisers posted more than $10 million each in the second quarter, filings show: South Bend, Ind., Mayor Pete Buttigieg ($24.9 million); former vice president Joe Biden ($22 million); Sen. Elizabeth Warren of Massachusetts ($19.2 million); Sen. Bernie Sanders of Vermont ($18 million); and Sen. Kamala D. Harris of California ($11.8 million).

Other candidates who polled in the low single digits in national polls reported figures that trailed far behind the top raisers, new filings show.

Former housing secretary Julián Castro raised $2.8 million in the second quarter, nearly 40 percent of it coming in the last four days of June after a standout debate performance.

His campaign spent at a fast clip — nearly 83 percent of the money he raised in the second quarter was also spent during that period. Castro’s biggest expense went toward digital advertising, which cost $1 million, records show.

His campaign said he raised $600,000 more since the debate, and that it is a sign that his campaign is gaining steam.

“This campaign is getting stronger, and stronger, and stronger,” Castro said Monday after a meet-and-greet at a union hall in southeast Iowa. “Some campaigns have started to lose altitude; they’ve been going backwards. Right now, I’m not near the front of the pack in fundraising, but we’ve been lean. We’re now going to be expanding the campaign.”

Other candidates spent more than they raised in the second quarter as they struggled to gain name recognition.

Among them: Sen. Cory Booker of New Jersey raised $4.6 million and spent $5.2 million; Washington Gov. Jay Inslee raised $3 million and spent $3.25 million; Sen. Kirsten Gillibrand of New York raised $2.3 million and spent $4.2 million; former Colorado governor John Hickenlooper raised $1.15 million and spent $1.6 million; self-help guru Marianne Williamson raised and spent $1.5 million; Rep. Tim Ryan of Ohio raised $889,264 and spent $541,111.

Each of those candidates registered at 1 percent or lower in the latest Washington Post-ABC News survey.

Overall, the Democratic field exceeded the record-breaking $105 million brought in by President Trump and the Republican National Committee in the second quarter — a sign of enthusiasm among Democratic primary voters. The 22 Democratic candidates who filed fundraising reports in the second quarter raised a total of $148 million, filings show.

Still, Trump continues to amass a big reelection machine by tapping into the loyal small-dollar donors in his base and the large checks written by his wealthy supporters.

David Weigel contributed reporting from Keokuk, Iowa.