President Trump raised $165 million in July for his campaign and shared committees with the Republican National Committee, outpacing Joseph R. Biden Jr., who raised $140 million last month as a record-setting pace of money continued to flood into the presidential campaign.
Mr. Biden, the presumptive Democratic nominee, had outraised Mr. Trump in the two previous months, the first time that he had outraised the Republican incumbent. Mr. Biden raised $141 million in his shared accounts with the Democratic National Committee in June, compared with $131 million for Mr. Trump with the R.N.C.
Both campaigns announced their dueling July figures on Wednesday evening, with Mr. Biden’s campaign going first and Mr. Trump’s soon following.
“Silent Majority Donors,” wrote Gary Coby, Mr. Trump’s digital director, on Twitter, surrounding the phrase with four American flag emojis.
The Biden campaign cheered how much of its haul it saved for the fall.
“The Biden campaign is on the march, building off the incredible momentum from this summer with another lights-out fund-raising month, banking another $50 million for the final stretch to Election Day,” said Mr. Biden’s campaign manager, Jennifer O’Malley Dillon, in a statement.
She said the campaign and party entered August with $294 million in the bank. Mr. Trump’s campaign said it and the party had more than $300 million cash on hand.
“The enthusiasm behind President Trump’s re-election continues to grow as July’s massive fund-raising totals prove,” said Bill Stepien, Mr. Trump’s new campaign manager. The Trump campaign said that July was its biggest online fund-raising month ever, as donations poured in even as Mr. Trump trails Mr. Biden in national and key battleground polls.
The Biden campaign did not break down how much of its total came from six-figure contributions but said that 97 percent of donations had been from “grass-roots” donors.
Earlier on Wednesday, the Biden campaign announced that it was reserving $280 million in ads beginning in September across 15 battleground states, with $220 million in television ads and $60 million in digital. Mr. Trump’s campaign has reserved $145 million in television ads after Labor Day but has not yet announced the size of its online reservations.