Republican presidential challenger Mitt Romneyenjoyed a surge of donations in September, raking in $170 million for the month -- a major cash infusion that is helping finance a deluge of advertising by his campaign in the final weeks of the White Housecontest.

Romney came close to matching the $181 million that President Obama raised last month -- and he did so during a rocky period for his candidacy and before his performance in the Oct. 3 debate, an event that greatly energized the Republican base.

Romney campaign officials indicated Monday that October was shaping up to be even better on the money front. Spokeswoman Andrea Saul tweeted that the campaign raised more than $27 million in small donations online during the first two weeks, better than any month so far.

The rapid pace with which the former Massachusetts governor brought in contributions in September puts him on track to join Obama in raising more than a record $1 billion for his presidential bid by election day.

As of Sept. 30, Romney had pulled in nearly $839 million through his campaign, the Republican National Committee and a joint fundraising committee, according to Federal Election Commission data and the Campaign Finance Institute.

Obama’s campaign and affiliated committees had raised $947 million by the end of September.

Romney’s most recent fundraising haul came when he was on the ropes over a leaked videotape of comments he made suggesting that Obama had the support of 47% of the country because they depend on government aid.

The tape was seized upon by Democrats, who featured Romney’s remarks in a series of ads that attacked him as a wealthy businessman indifferent to the needs of the middle class.

As Romney struggled to explain the comments, he spent much of the month attending a flurry of fundraisers, leading some Republicans to express concern that he wasn't holding enough public events.

But his cultivation of donors appears to have paid off. As of the end of September, his campaign and joint committees had $191 million on hand to finance the final stretch of the race. Obama’s campaign has not yet revealed its most recent cash-on-hand figure, but it ended August with more than $125 million in the bank.

“Mitt Romney and Paul Ryan are offering voters a vision for our country that will grow the economy, increase incomes and bring relief to the middle class,” said Romney’s national finance chairman, Spencer Zwick, in a statement Monday announcing September’s fundraising total. “That is why we are seeing such strong support from donors across the country.”

The campaign has also aggressively courted major donors, who have financed a larger share of Romney’s bid than Obama’s. On Monday, the top contributors to the GOP candidate assembled at the Waldorf Astoria in New York for a three-day donor retreat that includes a gala reception aboard the Intrepid Sea, Air and Space Museum featuring Ryan, former New York City Mayor Rudolph W. Giuliani and Donald Trump.