Continued from page 1

Nearly four years after Mr. McCain lost the presidential election to then-Sen. Barack Obama of Illinois, the mass of donations remained unspent because unlike Mr. Obama, Mr. McCain chose to forgo running a campaign funded by donors in the general election, instead accepting public financing.

He did, however, accept donations for a special fund that could be used for unanticipated legal, compliance and accounting costs. The compliance fund became a popular way for moneyed supporters to show their desire for a Republican president.

Brett G. Kappel, an election law attorney at Arent Fox LLP in the District, said giving to a charity is one of several options available to candidates with leftover funds, including compliance committees.

“They can give it to other candidates, federal or state parties, back to contributors — you can guess how often that happens — or to a [charity],” he said.

State parties also raised funds by attaching themselves to Mr. McCain’s name in what is known as a joint fundraising committee, in which state Republican parties and the candidate’s legal fund split the proceeds of fundraising events.

The result was that despite a tense campaign in which every bit of advertising could have helped, Mr. McCain and Mrs. Palin were left with a large secondary bank account that could not be used for political purposes. The holdings were so large that nearly $1 million dollars donated to the educational charity came from interest earned over the past four years.

Mr. McCain is, along with former Sen. Russ Feingold, Wisconsin Democrat, an author of a major 2002 campaign finance law known as the McCain-Feingold Act.