Democratic presidential candidate Bernie Sanders raised $26 million over the third quarter of the year. This puts him only $2 million short of the more mainstream frontrunner, Hillary Clinton, who gets much more of her money from large donors.

Bernie Sanders has been a vociferous critic of the presence of money in politics, and he has put his proverbial – and literal – money where his mouth is. His campaign is supported mostly by small-dollar donations made online.

Perhaps most surprisingly was that the campaign raised $2 million in a 24 hour period on the final day of donations for the fundraising period. Campaign spokesman Michael Briggs said that the donations poured in throughout Wednesday as the result of tweets and emails asking supporters to give as much as they can before the close of the quarter.

READ MORE: Bernie Sanders slams ’vicious attack’ by pro-Clinton lobby group over Corbyn support

Hillary Clinton’s campaign revealed its third-quarter fundraising coming in at $28 million, barely ahead of Sanders’ campaign’s haul.

This shows a serious narrowing of the funding gap between the insurgent Vermont senator and the former secretary of state, most of which is a result of grassroots support. At the end of the first quarter in July, the Sanders campaign said it raised a comparatively modest $15 million from 250,000 individual donors. This was towered over by Hillary Clinton’s $45 million – a record amount of first-quarter cash for a presidential campaign – from 200,000 donors.

The Sanders campaign at that time said that the average contribution was $33.51 and that 99 percent of the donations were under $250. Using division, we can estimate that that the average donation to Hillary during the same period was $225. A campaign aide of hers said that 91 percent of the donations were below 100 dollars, according to CNN.

Half of voters want criminal probe of Hillary Clinton’s private email use http://t.co/8LSPwHtYlQpic.twitter.com/3PVgcCeiNI — RT America (@RT_America) August 13, 2015

This time around, Sanders’ campaign got its $26 million from 1.3 million donations, putting the average contribution around only $20.

This surge in funds reflects the explosion of grassroots support over the previous few months, correlating with his drawing of large crowds and a dramatic increase in his standings in the polls.

While the gap between cash is closing, the contrast between the fundraising tactics of the two candidates remains stark. Where Sanders has only had a few fundraisers, with supporters gaining entry with a $50 donation, Clinton has held numerous big-dollar fundraising events, with many occurring on the same day. Clinton even held a fundraiser Wednesday night at the final moments of the quarter. Held in New York City, 130 attendees donated between $1,000 and $2,700 each.

This is characteristic of the Sanders and Clinton campaigns. The majority of Clinton’s donations come from donations of between $200 and the campaign contribution limit of $2,700. More than three-quarters of the Sanders campaign’s money, on the other hand, comes from contributions under $200, according to NPR.

READ MORE: Obama is 'opportunist,' Hillary Clinton no different just 'more militant' - Chomsky

While Sanders has narrowed the fundraising gap in the most recent quarter, Hillary currently has a large lead on Sanders in terms of total cash raised over all quarters. But we might be looking at a very different fundraising landscape if there was a system of matching small donations to candidates with public money, according to a report by left-wing advocacy group PIRG, The Intercept reported. While Sanders has narrowed the fundraising gap in the most recent quarter, Hillary currently has a large lead on Sanders in terms of total cash raised over all quarters.

In a hypothetical system where candidates wouldn’t be allowed to take more than $200 from any individual, and where every $1 of such donations would be matched by $6 of public money, Sanders would have much more money than Hillary: $69.6 million for the self-described socialist’s campaign compared to a mere $43.7 million for Clinton.

The Democratic Party has recently come out in favor of a public matching system, with 153 of the 188 Democrats in the House of Representatives and 19 of the 44 Democrats in the Senate supporting such a bill. This proposal isn’t that far out there – New York City already has a public matching system similar to the one that PIRG proposes.

The campaigns of other Democrat contenders, Virginia Senator Jim Webb, Maryland Governor Martin O'Malley, and former Rhode Island Governor Lincoln Chafee, did not release numbers on contributions for the third quarter.