WASHINGTON -- Sen. John McCain's presidential campaign is relying on loopholes in campaign finance law to raise and spend money outside of the government's public funding program.

Sen. McCain's campaign appears to be doing everything it legally can to keep up with Democratic candidate Barack Obama, who opted out of the system and has been raising cash at a torrid pace.

"McCain kept his promise to stay in the public financing system," said spokesman Brian Rogers. "Obama broke his out of pure political self-interest and went on to raise $150 million in one month."

When he accepted $84.1 million in public funding for his campaign, Sen. McCain agreed to not raise or spend any other money. But the law allows him to create what's called a "compliance fund" to pay for legal fees associated with complying with campaign finance rules.

Both President George W. Bush and John Kerry created similar funds in 2004. But Sen. McCain is using his to an unprecedented degree. In 2004, Messrs. Bush and Kerry each spent about $2 million from their funds before Election Day.