ST. PETERSBURG — Seeking to stem the influence of big-money interests in local elections, St. Petersburg became the first city in the nation Thursday to limit contributions to political action committees.

It also may have opened residents to millions in legal costs, city attorneys warned.

The 6-2 vote by the City Council serves as a rebuke to Citizens United vs. the Federal Elections Commission, the controversial 2010 U.S. Supreme Court decision that removed restrictions on how much outside groups can spend to influence elections. The council's vote instead seeks to limit how much money individuals can give to PACs that seek to influence city elections.

The ordinance caps at $5,000 a year the amount of money an individual can give to PACs involved in city elections. It also requires more extensive disclosure by donors.

"This is an historic vote. . . . It's a model law for the nation," said John Bonifaz, a constitutional attorney from Massachusetts whose group Free Speech for People pushed the initiative.

He said legal challenges to the ordinance, which city attorneys argued violates First Amendment free speech provisions, may end up being litigated in the nation's highest court and provide a new avenue in which to weaken Citizens United.

"It's possible it could go there," said Bonifaz, the founder of Free Speech for People, an Austin, Texas-based advocacy group for campaign finance reform.

During the four-hour council debate, the current mayoral race between incumbent Rick Kriseman and former Mayor Rick Baker was offered as a prime exhibit of why the city needed to reign in campaign spending.

Kriseman's supporters on the council argued well-heeled groups such as developers, utilities and other outside interests were working to remove power from ordinary residents. Baker's supporters responded the city was offering itself as a sacrificial lamb to national opponents of Citizens United and risked a legal defeat that could cost the city financially.

So far, Baker and Kriseman have raised more than $2.2 million in their campaigns, exponentially shattering previous records. Political groups backing both candidates have accepted large donations from influential individuals. Baker's has received at least $50,000 from his current boss, Tampa Bay Rowdies owner Bill Edwards. Kriseman's has accepted tens of thousands of dollars from Tampa Bay Rays owner Stuart Sternberg.

The ordinance goes into effect in January, so the current mayoral and council races won't be affected.

"The money in politics is obscene," said council member Charlie Gerdes, who voted for the measure. "Our current mayor's race, that's all the proof you need that money has become a problem in local elections."

For much of the debate, the mystery was whether council member Amy Foster would vote yes. She said she was concerned that the $500 fine for violations was too weak.

Council Chairwoman Darden Rice, who has championed the ordinance for nearly a year and a half, implored Foster to join her, saying: "We're counting on you" before gaveling the meeting to close for lunch.

Foster later said she was persuaded by Gerdes' argument that voters would, in effect, enforce the ordinance by punishing candidates who flout the rules.

In the end, council member Steve Kornell, who had voted against the proposal in June, switched sides, giving supporters a comfortable majority. Council members Jim Kennedy and Ed Montanari voted no.

They sided with city attorney Jackie Kovilaritch's office, which argued that the ordinance would violate the First Amendment and expose the city to expensive litigation.

For much of the debate, Bonifaz and the city's top litigator, Joseph Patner, traded blistering legal arguments.

"The likeliest outcome is an injunction stopping the ordinance from ever accomplishing anything," Patner said. And city employees, such as city clerk Chan Srinivasa, would be subject to being sued personally if they tried to enforce it, he said.

Bonifaz framed the decision as something city leaders must do to stop an erosion of democracy that will only worsen.

"It need not wait for the flood to come into the city in order to protect itself from that flood," Bonifaz said. "This is not something that needs to be punted to a state capital or Congress."

Kriseman, speaking at a early-morning rally on the steps of City Hall, said the effort was a "righteous" cause.

"I look forward to the day where millions of dollars aren't making their way into a mayor's race or any race in this city," Kriseman said.

Baker has said he opposed the ordinance and has accused the mayor of political opportunism, saying Kriseman pledged support only after being challenged by a well-funded opponent.

After hours of emotional debate, including impassioned pleas to adopt the ordinance by 33 speakers, Julie Kessel and Karen Lieberman, leaders of the League of Women Voters of the St. Petersburg Area, collapsed into a tearful hug.

Bonifaz said part of the reason People For Freedom picked the city was because of strong grass roots support. The league organized rallies and appeared at council meetings for months voicing support.

National constitutional scholars such as Harvard University's Laurence Tribe also sent testimony in support. Bonifaz said his group would help defend the city for free if a legal challenge materializes.

The 11th U.S. Circuit Court of Appeals has been silent on the issue, another reason St. Petersburg was selected, Bonifaz said.

Rice said, whatever happens in the courts, she was proud to have fought for something she felt was essential for the city's future.

"I said a long time ago that this was the hill I'd die on," she said after the vote. "Today, I lived."

Contact Charlie Frago at cfrago@tampabay.com or (727)893-8459. Follow@CharlieFrago.