RIO DE JANEIRO (AP) — Brazil's Supreme Court on Thursday banned corporate contributions to political campaigns and parties, a hot issue as investigators in the nation's biggest corruption scandal say such financing was used by businesses to win lucrative contracts with state-run oil company Petrobras.

The court ruled 8-3 to block such campaign financing — which in the most recent presidential elections represented well over 90 percent of the funding for leading candidates and eventual presidents.

Brazil's bar association brought the case to the top court, which first took it up in 2013 but saw a conservative justice block a final vote until now.

"The influence of economic power culminates by turning the electoral process into a political game of marked cards, an odious pantomime that turns the voter into a puppet, crumbling in one blow citizenship and democracy," said Justice Rosa Weber in voting to strike down the financing.

Despite the ruling long called for by transparency watchdog groups, the top court's action may not be the final say on the matter. Brazil's Congress last week passed a new campaign financing measure that would allow corporations to make donations, albeit in smaller amounts.

The 1995 law the court struck down Thursday night allowed corporations to donate 2 percent of their gross revenue from the year prior to any particular election cycle. The new measure passed by Congress limits corporations to making a total of just over $5 million in contributions.

President Dilma Rousseff is expected to veto the new measure. If her veto is overridden, the top court would have to again take up the issue, which analysts say it would likely to in an urgent manner, given Thursday's ruling.

Petrobras is engulfed in a huge kickback scheme in which prosecutors allege at least $2 billion in bribes were paid out over about a decade by big construction and engineering firms, which were in turn given vastly inflated contracts with the energy company.

Prosecutors and former Petrobras executives who admit to have taken bribes and have turned state's witnesses say that part of the money made its way to the campaign coffers of political parties via what were then legal contributions.

In recent election cycles, construction and engineering firms have routinely been among the biggest campaign donors to politicians and parties across the political spectrum. Such money has tended to track the Brazilian government's huge investments in infrastructure in the past decade as it has hosted the world's two biggest sporting events and announced aggressive efforts to improve ports, roads, airports and railways, among other projects.

An Associated Press analysis ahead of last year's World Cup found that campaign contributions by Brazil's No. 2 construction company, Andrade Gutierrez, increased 500-fold from one election cycle to the next, after it was known which cities would host soccer matches and thus see billions spent on new or refurbished stadiums and other works.

Andrade Gutierrez at the time said its contributions were legal — which they were. But polls have consistently said in recent years that over three-fourths of Brazilians believed such contributions stoked widespread corruption.

The three justices who voted to maintain corporate financing said they found nothing in the constitution to prohibit it.

"My understanding is that (corporate financing) isn't contrary to the constitution . as long as they're made under an effective mechanism of control that prevents the abuse of economic power," Justice Celso de Mello said in voting to keep the contributions.

___

Brad Brooks on Twitter: www.twitter.com/bradleybrooks