* Oil-producing states want new law declared unconstitutional
* Law shares out royalty income to other 24 states
* Legal battle clouds future of troubled oil industry
By Anthony Boadle and Jeb Blount
BRASILIA/RIO DE JANEIRO, March 15 Brazil's main oil-producing states asked their country's Supreme Court on Friday to overturn a new law that strips them of billions of dollars in royalties levied on the output of rich offshore oil fields.
The two biggest producers, Rio de Janeiro and Espirito Santo states, filed challenges with the court in Brasilia arguing that the legislation is unconstitutional because it changes existing contracts and violates Brazil's fiscal discipline law.
Brazil's constitution has clauses limiting the government's ability to deprive people of established rights. A decade ago, Rio de Janeiro and other states pledged a percentage of oil royalties to make payments on debt to the federal government.
The bill signed into law by president Dilma Rousseff on Thursday night forces the government to share offshore oil royalties more equally among the country's 26 states, federal district, and 5,500 municipalities.
The dispute has poisoned relations between Brazil's states and clouded the once-bright future of Brazil's oil industry, where plans to auction production sharing concessions to tap huge subsalt fields have been delayed by regulatory quarrels.
The royalty bill was originally meant to more widely distribute Brazil's future oil wealth as it developed giant new "subsalt" resources off its Atlantic coast near Rio de Janeiro.
But non-oil producing states and those with small on-shore production wanted to get access to resources for education right away and pushed through legislation that divided up royalties on existing offshore oil agreements as well.
With 80 percent of output and the bulk of royalty payments, Rio de Janeiro and Espirito Santo were receiving too much from the offshore oil that was seen more as a federal resource than a state one, supporters of the change said.
"Congress ignored our situation and we have had to resort to the Supreme Court. We hope the court appreciates our arguments," said Espirito Santo Governor Renato Casagrande in a telephone interview.
Otherwise, he said, "we will have to adjust our budget, cut programs, reduce jobs and investments."
Espirito Santo stands to lose 800 million reais ($405 million) this year, and 10 billion reais by 2020 in reduced royalty revenues if the law stands, Casagrande said.
Rio de Janeiro, Brazil's top oil state, has estimated it could lose 3.1 billion reais ($1.59 billion) in income this year alone from the new royalty sharing law.
In response, Rio de Janeiro Governor Sergio Cabral last week ordered the suspension of all the state's payments - except for legally mandated public employee salaries and transfers to municipalities. Cabral warned that the new law will threaten Rio's plans to host the soccer World Cup next year and the 2016 Olympic Games.
President Rousseff vetoed the original bill to ensure that only royalties from future oil contracts would be shared. Non-producing states, which have a majority in congress, overrode her veto to grant themselves a bigger share of royalties from existing production.
The distribution of royalties is not expected to directly affect oil companies working in Brazil. However, the dispute and threats by Rio de Janeiro to raise taxes on oil companies to make up for the royalty losses could dampen interest in three oil rights auctions planned for this year.
If the new royalty rules are upheld by the Supreme Court, states and municipalities will start receiving their royalty checks in May.
The feud between states could hinder the Rousseff government's efforts to lower and unify inter-state taxes, which is part of a web of duties that makes the Brazilian tax system, one of the most onerous and complicated in the world.
Any agreement would require the approval of all 26 states and federal district in addition to Congress.
"Tax reform in Brazil is always difficult, with this 'royalty' war it becomes even more complicated," said Benedito Tadeu César, political scientist and director of the Institute of Research and Social Projects.
"This could make it more difficult because some of the richer states, which are losing money in the royalty dispute, will not be willing to let go of any more revenue," Cesar said.
To avoid further strife between the states, some governors led by Eduardo Campos of Pernambuco, have suggested that the new royalty sharing legislation not apply to existing contracts, as the producers want. Instead, Campos suggested the federal government boost transfers to non-producing states by about 4.6 billion reais a year.
"That's a very good idea, we agree, as long as existing contracts are preserved," said Casagrande, a member of Campos' Brazilian Socialist Party (PSB). But that depends on Rousseff agreeing to the compensation, he said.