Democratic presidential candidate Beto O’Rourke speaks at the League of United Latin American Citizens (LULAC) Presidential Town Hall in Milwaukee this month. (Sara Stathas/Bloomberg News)

Former Texas congressman Beto O’Rourke’s presidential campaign raised $3.7 million in the second quarter of this year — far less than the roughly $6 million that his campaign said it collected on the first day of his candidacy.

When O’Rourke got into the race four months ago at the urging of supporters, he was expected to be a magnet for political donations, having raised $80 million for his unsuccessful Senate race in Texas last year. During the first 17 days of his presidential campaign, he raised $9.4 million.

But O’Rourke’s lackluster fundraising for the three-month period ending June 30 shows the challenge he faces to remain competitive in the crowded Democratic field.

O’Rourke spent $5.2 million in the second quarter, one of the highest spending rates among the two dozen major Democrats running for president. That raised questions about how much longer he can support the large campaign infrastructure he is building.

O’Rourke’s campaign manager, Jen O’Malley Dillon, said in an interview late Monday that the campaign launched without a full staff in place and just recently hired a national finance director, who started this week, and a digital director, who started a month ago. Now with more than 100 staff members across the nation, she said she’s confident that the campaign can increase its fundraising.

“We’re going to have the money that we need,” O’Malley Dillon said.

Many low-polling Democratic presidential hopefuls drew in far less cash in the past three months than did their more prominent rivals, and they spent almost all the money they raised — an ominous sign for their ability to survive a lengthy primary fight.

In addition to O’Rourke, 11 others 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 lower-ranking candidates 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.

O’Rourke announced his latest fundraising total in a tweet late Monday night, hours before it would be made public in a financial filing. The total had been kept secret from many campaign staffers and prominent supporters, and even the candidate recently claimed to be unaware of how much money his campaign had collected.

Candidates polling near the top of the field all reported drawing at least $10 million during the same three-month period, federal filings made public Monday night show.

The top Democratic fundraisers of the second quarter, based on federal filings, were: 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).

O’Rourke raised less money than Sen. Cory Booker of New Jersey ($4.5 million), but more than Washington Gov. Jay Inslee ($3 million), Sen. Michael Bennet of Colorado ($2.8 million), former housing secretary Julián Castro ($2.8 million) and entrepreneur Andrew Yang ($2.8 million). His haul is comparable to that of Sen. Amy Klobuchar of Minnesota ($3.9 million).

Of the money O’Rourke raised, 44.4 percent came from contributions of $200 or less. In all, O’Rourke has raised $13 million since launching his presidential campaign.

O’Rourke has struggled to establish himself among the two dozen Democratic hopefuls. During the first debate, he was attacked by fellow Democrats and struggled to directly answer questions, leading to widespread criticism and concern among his top donors.

During the second quarter, O’Rourke started attending high-price fundraisers and privately courting donors — things his aides had once bragged to reporters that their candidate didn’t need to do.

O’Malley Dillon on Monday sounded an optimistic note about the candidate’s chances, writing in a lengthy memo to supporters: “When you look at our fundraising in aggregate, we’re in a great position. I won’t sugar coat it: we have work to do, but we have the resources we need to execute our strategy.”

She added: “I’ve been here before. Hell, if I had a dollar for every time I was on a campaign that seemed left for dead, I’d probably exceed our average contribution.”

In an interview, O’Malley Dillon said many of the nearly 200,000 donors who have given money to O’Rourke did not donate the maximum amount allowed and could be tapped for future contributions. And the campaign has started to produce more video content that can be used on social media and to encourage donations, she said.

She said she sees enthusiasm around O’Rourke’s candidacy that’s not reflected in national poll numbers or fundraising, including a recent Nashville rally that drew more than 1,000 people.

O’Malley Dillon said she held a staff meeting in El Paso on Monday night, after the fundraising number was released, and told those assembled, “I’m only asking for two things: to believe, not just in Beto but that progress is still possible in this country, and to do the work, every single day.”

“Morale is very strong because of who we work for,” she said.

Still, the stakes are high for O’Rourke’s next debate performance, at the end of July in Detroit. He is poised to qualify for the following Democratic debate, in September.

“I’m a great admirer of Beto O’Rourke’s, but he has to perform the third act of ‘Aida’ in the next debate to be considered a serious prospect again,” said Robert Zimmerman, a Democratic National Committee member and Democratic fundraiser. “Beto O’Rourke’s dynamicism against Ted Cruz elevated him dramatically. He’s on a stage now with equally dynamic Democrats with much of the same message.”