Mitt Romney has a lot of money -- both personally and for his campaign.

So why in the world would he need to borrow $20 million?

The answer lies in the complicated world of campaign finance, in which the rules limit how much money a candidate can accept from individual donors for both the primary election and the general election -- and the money raised for each can only be spent in the corresponding election.

Candidates are only allowed to raise $2,500 from an individual donor for the primary and another $2,500 for the general election. For political action committees, the limit for each election is $5,000.

Romney wrapped up the Republican nomination long ago, but he didn't officially accept it until Aug. 30. Up until that point, according to the law, he was not allowed to spend the funds he raised for the general election.

It appears what happened is that Romney ran out of primary funds at some point and was forced to borrow a significant chunk of change to get his campaign through August.

Romney's problem appears to have resulted from his reliance on big donors, according to the Post's Dan Eggen and Philip Rucker:

The loan from the Bank of Georgetown, first reported Tuesday night by National Review Online and confirmed by a senior campaign official, provides a telling glimpse into previously unknown money troubles within the Romney camp over the summer. Romney has relied heavily on wealthy donors but has had persistent difficulty raising money among grassroots donors, who could have helped buoy his finances during the long summer before the Republican convention in Tampa.

The cash shortfall seems to be a large reason Romney's campaign didn't launch a robust counter-offensive when the Obama campaign ran tens of millions of dollars worth of attack ads over the summer, much of it on Bain Capital. Instead, Romney relied on well-funded outside groups to run ads defending him.

Now that he's in the general election, Romney can tap all of his money -- and he's got significantly more than Obama.

In the 2008 presidential race, Sen. John McCain paid down a primary loan using money from the general election that he accepted through the matching funds program. The matching funds program, which neither candidate is using this year, provided McCain a set amount of general election money in exchange for raising less money from individuals.

Update 10:37 a.m.: Dan Eggen reports this morning:

Although he could legally settle the debt with general election funds, Romney is instead raising separate primary contributions to repay the loan, a campaign official said Wednesday. The tactic will allow the campaign to maximize its cash available over the next 50 days and to call upon newer donors to help without hitting contribution limits.

Paying down the debt doesn't seem to have been too much of a problem for Romney thus far. The campaign said Tuesday night that it has paid off nearly half of it and has $11 million in debt right now.

At the end of July, Romney's campaign had $30 million in the bank, but when you factor in the national party committee and a joint fundraising committee, he had a $60-plus million edge on Obama, $186 million to $124 million.

Dan Eggen contributed to this report.