SAO PAULO–The Brazilian Superior Court of Justice ruled against local banks in a case concerning how the banks should calculate interest for customers who are owed payments on savings accounts that were subject to national economic plans during the late 1980s and early 1990s.

The ruling is part of an ongoing legal battle between Brazilian banks and consumers in which tens of billions of dollars are at stake, regarding a dispute over savings accounts that dates back more than two decades.

Account holders across the country claim they weren’t paid enough interest on their savings by the banks as Brazil navigated its way through a series of economic plans designed to stabilize prices between 1986 and 1991.

As the government sought to cut down on inflation, the bank customers claim the interest on savings accounts didn’t keep up with rising prices.

Late Wednesday, the Superior Court ruled that interest rates on savings accounts must be calculated starting from the date the lawsuits were filed, rather than when each plaintiff demands payments.

“The decision by the superior court showed that the justice will not bow to the banks’ pressures,” said the director of consumer advocacy group, Idec, Marilena Lazzarini in a statement. Bank officials weren’t immediately reached for comment.

Given the complexity of the case, this case was split by the supreme court and superior court. The superior court ruling regards just the mechanism of interest-rate calculation to be adopted in by the Supreme Court, which is the higher level court in Brazil.

Although estimates vary wildly, the case could cost banks as much as 341 billion Brazilian reais ($155 billion), and government ministers have warned that a ruling against the banks could harm the financial system and damage an already-weak economy. Consumer advocates have said that amount is exaggerated and they put the figure closer to between 10 billion and 20 billion reais. Government officials have warned that a ruling against the banks in line with the worst-case scenario could damage the financial system and harm economic growth. Idec and other representatives of the savings-account holders have said the estimates are overblown.

The dispute is one of the most high-profile examples of how the complexity and the delays in the Brazilian legal system can hamstring business and finance. Analysts have said these types of cases harm confidence, stop companies from investing and make the economy less efficient and dynamic.

After the ruling, bank share prices dropped on the local exchange. State-run bank Banco do Brasil SA (BBD, BBAS3.BR), country’s largest bank by assets, fell 5.82% to BRL22.35, Itau Unibanco (ITUB, ITUB3.BR) fell 2.12% to BRL35.90; and Banco Bradesco AS (BBD, BBDC3.BR) fell 2.53% at BRL33.02.