Republican presidential candidate Donald Trump's campaign raised just $3.1 million in May, while Democratic rival Hillary Clinton brought in $27 million. Here's a breakdown of the two campaigns' finances. (Jenny Starrs/The Washington Post)

Presumptive Republican nominee Donald Trump loaned his campaign $2.2 million in May and collected $3.1 million in donations, ending the month with less than $1.3 million in the bank, according to new campaign finance filings.

The real estate mogul's meager cash flow spotlighted the urgent need for him to dramatically ramp up the fundraising he is doing in conjunction with the Republican National Committee, a task he has fitfully embraced.

Trump's small haul came as presumptive Democratic nominee Hillary Clinton continued to stockpile money: She raised more than $28 million in May and started June with $42 million in cash. Clinton brought in nearly a third of her campaign funds last month through the Hillary Victory Fund, a joint fundraising committee with the Democratic National Committee and 32 state parties.

The billionaire developer has now loaned his campaign $45.7 million and given it $400,000 more, while collecting $17 million in contributions. In late May, Trump set up two joint fundraising committees with the RNC, a move that was supposed to help him and the party tap into a gusher of cash. But GOP fundraisers have said it has been difficult to line up donors to bundle checks from their friends and family.

Amid criticism from fellow Republicans about his tone and provocative statements, Trump suggested over the weekend that he would "just keep funding my own campaign" if GOP leaders did not rally behind his candidacy. But it is unclear whether he could access the hundreds of millions needed to finance a national campaign. He suggested in May that to do so, he would have to "sell a couple of buildings."

Trump's limited cash meant that he spent just $6.7 million in May, down from $9.4 million in April. Nearly $1 million went to purchase hats and other campaign merchandise, while $838,000 was spent on travel. The campaign spent just $150,000 on media buys.

Clinton's spending also ratcheted down last month after an intense buildup through the Democratic primaries. After shelling out nearly $29 million in March and almost $24 million in April, her presidential campaign committee spent just $13.7 million in May. The bulk of the money went to pay for the 683 staffers on payroll for the month, a cost of $3.8 million. The campaign spent $1.6 million on ad production and air time and $1.6 million on travel.

Meanwhile, Sen. Bernie Sanders of Vermont pulled in $15.7 million in May, even as his hopes of beating out Clinton for the Democratic nomination were dwindling. His campaign spent $13 million for the month and entered June with $9.2 million.