Former secretary of state Hillary Rodham Clinton’s front-runner status in the Democratic presidential primary fight was jolted Wednesday by a new and unexpected vulnerability: a financial one.

The more than $28 million that Clinton’s campaign announced Wednesday it had raised in the third quarter was nearly matched by the $26 million that Sen. Bernie Sanders brought in, thanks to small contributions that came in for him at a faster clip than even in President Obama’s campaigns.

As the midnight deadline loomed to collect third-quarter donations, Sanders’s passionate supporters raced to expand his total, raising the possibility that he might finish the quarter with more money in the bank than Clinton.

The ability of the senator from Vermont — who has largely eschewed wealthy backers and fancy fundraisers — to compete with Clinton’s four-decade-old donor network could drastically alter the dynamics of the primary contest.

It gives new lift to Sanders, who has been discounted by many party leaders as a serious threat to Clinton. And it further weighs down her campaign, which is struggling to contain questions about her use of a private e-mail server while she was secretary of state.

Democratic candidate for president, Sen. Bernie Sander’s (I-Vt.) campaign is surging, but does he even have a chance against Hillary Clinton? The Fix’s Chris Cillizza explains. (Pamela Kirkland and Randolph Smith/The Washington Post)

Clinton campaign officials maintained that they were pleased by her summer fundraising total, which came after she headlined dozens of high-dollar finance events and made an intense press for online donations. Aides noted that they are on pace to reach the goal of raising $100 million by the end of the year.

“We are thrilled and grateful for the support of hundreds of thousands of donors across the country, helping us raise a record $75 million in the first two quarters,” campaign manager Robby Mook said in a statement. “Thanks to our supporters, we are able to meet our goals and build an organization that can mobilize millions of voters to ensure Hillary Clinton is their fighter in the White House.”

But advisers to Sanders marveled at the close money race.

“I think it’s remarkable that Bernie Sanders was able to raise almost as much money as Hillary Clinton, particularly given the way he is raising money,” said Tad Devine, a veteran Democratic strategist advising Sanders. “That we could get this close so quickly is a huge achievement.”

Both camps acknowledged the significance of the numbers late Wednesday. One Sanders supporter tweeted, “There’s still time.” And former president Bill Clinton wrote in an evening e-mail to supporters of his wife’s campaign: “Will you help elect her by donating $1 before midnight tonight?”

Shortly after midnight, a Sanders aide said the campaign had raised more than $2 million online just on Wednesday, with about $500,000 of that coming in after 10:30 p.m.

Only one other campaign released totals Wednesday, the last day of the fundraising quarter: GOP contender Ben Carson, who pulled in at least $20 million, according to a spokesman.

The jockeying over fundraising totals comes as Sanders has pulled even or taken the lead in polls out of Iowa and New Hampshire, the first two nominating states.

In all, Clinton has raised $75 million for her 2016 bid, while Sanders has pulled in more than $40 million.

Devine said the senator’s team had gauged that it would need at least $40 million before the Iowa caucuses to run credibly against Clinton — a mark it has now hit months ahead of schedule.

Sanders’s campaign said it has more than $25 million in the bank, a reflection of a more thrifty campaign and one that has yet to start airing television ads, as the former secretary of state has.

Devine questioned why Clinton has not yet released how much cash she has on hand.

“It’s not just how much money you raise,” he said. “It’s how you spend the money.”

Clinton’s campaign did not respond to a request for comment.

Sanders, a self-described democratic socialist who decries the political influence of the “billionaire class,” has focused on raising money over the Internet, mostly in small increments.

By Wednesday evening, his campaign said it had received 1.3 million donations from about 650,000 different donors. That put Sanders across the threshold of 1 million contributions earlier than Barack Obama in both his presidential campaigns.

Obama reached 1 million donations in his 2008 campaign in February of that year. In 2012, Obama’s campaign announced it had reached the mark in October 2011. Unlike Sanders, Obama also heavily courted larger donors as well.

Devine said that a big advantage of Sanders’s style of raising money is that he can return again and again to the same donors for additional contributions, given that most of them are giving well under the $2,700 limit for the campaign cycle.

“They will have enormous headroom to continue to contribute to the campaign,” Devine said.

As of June 30, Clinton had more than 250,000 individual contributors. Her campaign declined to share the current figure on Wednesday.

Unlike most other presidential candidates, Sanders has discouraged the support of super PACs, groups that operate independently of the campaigns but have the ability to raise unlimited sums to promote their preferred candidates.

Clinton has also decried the influence of big money on politics, but she is accepting the backing of two super PACs working to help elect her. The main group, Priorities USA Action, raised $15.6 million in the first half of the year and has commitments for another $25 million.

As Obama demonstrated in his races, a robust small donor base can be a powerful financial force. In his 2012 reelection campaign, 28 percent of his individual contributions — $216 million – came from donors who gave $200 or less cumulatively, according to the nonpartisan Campaign Finance Institute.

While Sanders is spending considerably less money on his campaign than Clinton, he has invested heavily on operations in those states and has been making hires for states later in the calendar.

Devine said the Sanders campaign had made a strategic decision not to try to match Clinton’s early spending on television ads in order to conserve its resources. “We wanted to have as big a pile of cash on hand at the end of this quarter while aggressively building operations in the early states,” he said.

David Weigel contributed to this report.