The irony is hard to miss: Sen. John McCain (R-Ariz.), the co-architect of one of the most sweeping campaign finance measures in U.S. history, was accused by Democrats on Wednesday of breaking that very law.

But the McCain campaign called the allegations a baseless election-season stunt and said Democrats didn't have their facts straight.

In a complaint filed with the Federal Election Commission, the Democratic Congressional Campaign Committee alleged that television ads aiding two House candidates from Arizona violate the McCain-Feingold law, the 2002 legislation that sought to restrain campaign spending and contributions.

In the ads, which were paid for by the Friends of John McCain campaign committee, McCain appears alongside Sen. Jon Kyl (R-Ariz.) to urge voters to support GOP candidates Ruth McClung and Jesse Kelly. The DCCC says the ad amounts to an "in-kind" contribution that exceeds the limits under McCain-Feingold. Non-cash contributions are limited to $4,800.

The Democrats also say the ads run afoul of rules limiting a campaign committee to supporting only one candidate, with a small $2,000 exception.

"Senator McCain either doesn't understand the law bearing his name, or he has deliberately chosen to break it," said DCCC spokeswoman Jennifer Crider.

The McCain campaign flatly rejected the allegations, releasing documents showing that it reported the ads to the Senate earlier this week as "independent expenditures." Such expenses are not treated like contributions under campaign laws. The DCCC complaint suggested that the McCain campaign had not taken that step.

"It's not surprising that Democrats would try to change the subject from their struggling ticket with a baseless, frivolous complaint intended as a publicity stunt," said McCain spokesman Brian Rogers. "Senator McCain has always followed the letter and the spirit of the campaign finance law."

Friends of McCain said it spent $80,000 on each of the ad buys, records show.

The DCCC's allegations are part of a broader effort by Democrats to portray McCain as a political opportunist who has turned his back on his record as a moderate Republican. The 2008 presidential candidate reversed or softened his positions on immigration and other issues in the face of a primary challenge earlier this year, and he has remained mum about a Supreme Court ruling that effectively gutted the campaign-finance law.

McClung is challenging Rep. Raul Grijalva (D) in Arizona's 7th District, while Kelly is challenging Rep. Gabrielle Giffords (D) in the 8th District. The incumbents have each outraised their GOP opponents by about 10 to 1 in the two districts, both of which border Mexico.