The House on Wednesday voted to limit the multimillion-dollar donations to nonprofit groups that changed the face of American politics in the 2004 presidential election.

Majority Republicans said they were closing what they contended was a gaping loophole. Democrats portrayed the vote as an effort to undercut their supporters.

Republican support carried the day in the 218-209 vote to cap contributions to "527" political groups. The outcome was a sharp turnaround from 2002, when Republicans resisted the successful Democratic-led legislation to limit campaign spending.

The flow of unregulated contributions "still dominates the political landscape," said Rep. David Dreier, R-Calif. Urging constraints on the nonprofit groups that overwhelmingly favored Democratic causes in 2004, he said, "Now it's going to 527s instead of the political parties."

House Minority Whip Steny Hoyer, D-Md., called the caps an effort by Republicans to gag opponents' free speech rights.

"I challenge the other side to explain how (the bill) will increase the public's faith that elected representatives are adhering to the strictest ethical code, and will pay an appropriate price if they veer from it," Hoyer said.

The "527" refers to a section of the tax law. These groups are tax-exempt organizations that use voter mobilization and issue advertisements to influence federal elections.

They blossomed after a campaign finance law in 2002 banned federal candidates and the national parties from accepting unlimited donations from individuals, unions and corporations.

The legislation would require such to abide by the contribution limits imposed on other political committees.

Donors could contribute only $25,000 a year for partisan voter mobilization activities and $5,000 a year for direct expenditures on federal elections.

During the 2003-2004 election cycle, businessman George Soros gave more than $23 million to Democratic-aligned 527 groups such as Media Fund and America Coming Together. Houston homebuilder Bob Perry contributed more than $8 million specifically to help the Swift Boat Veterans for Truth group that questioned the Vietnam War record of Massachusetts Sen. John Kerry, the Democratic presidential nominee.

These 527 groups raised more than $400 million in 2003-2004, with organizations supporting Kerry or opposing President Bush bringing in $266 million, according to the Political Money Line campaign finance tracking service.

Democrats claim the main GOP objective is to undercut groups that are antagonistic to Republican causes. They say constricting 527s would shift political contributions to other business and social welfare organizations, categorized as 501(c) groups; these groups have some restrictions on political activities but, unlike 527s, do not have to identify donors.

The limits would "hamstring independent groups while they keep open the flow to trade organizations that can spend unlimited amounts of money," said Rep. Juanita Millender-McDonald, D-Calif. "They are restricting unions and these independent groups. That is just mean-spirited."

Rep. Christopher Shays, R-Conn., sponsored both the 2002 campaign finance and the 527 bill with Rep. Marty Meehan, D-Mass.

Shays said it was an "outrage" that Democrats who supported spending limits four years ago now balked at cracking down on individuals who contribute millions. He said just 25 people accounted for $142 million in donations in the last election.

The White House said it strongly supports the bill. "The president has repeatedly called for an end to abuses of the nation's campaign finance system through the use of 527 organizations," according to a statement.

The House bill also would repeal current law that limits the amount a party can spend in direct coordination with candidates.

Fred Wertheimer, president of the campaign finance watchdog group Democracy 21, said his organization opposes that proposal. He said the law now provides a buffer for individuals who give parties money that goes directly to a specific race. He said his group still supports the overall bill.

"Most Democrats and most Republicans are approaching this particular fight on partisan grounds," Wertheimer said. "But it is a simple proposition that groups whose purpose is to influence federal elections and are spending money to influence federal elections should comply with campaign finance laws."

Good government groups such as Democracy 21 and Public Citizen, normally allied with Democrats on campaign finance issues, have sided with Republicans on this matter.

On the other hand, several conservative groups that consider spending limitations a free speech issue have joined Democrats in opposing the legislation.

"Legislation to alter the state of 527s is a breathtaking assault on First Amendment free speech rights," the conservative Club for Growth's president Pat Toomey, said in a statement.

The GOP leadership rejected proposals by Rep. Mike Pence of Indiana, a leading Republican conservative, to further deregulate spending limits.

House GOP leaders originally sought to combine 527 legislation with a lobbying and ethics bill now working its way through House committees. But they decided to address the issue separately.

The Senate passed a lobbying bill last month that does not address 527 or other campaign finance issues.