* Oil-producing states say law violates constitution
* Brazil's non-oil states dominate in congress
* Law must be finalized before new oil blocks auctioned
BRASILIA, March 14 (Reuters) - Brazil's President Dilma Rousseff signed into law on Thursday a bill stripping oil-producing states of billions in royalty earnings to share them with non-producing regions, but a legal challenge is expected to the hotly-contested change.
Rio de Janeiro, Espirito Santo and Sao Paulo states, all on the southeast coast where most of Brazil's offshore oil is produced, have vowed to challenge the law in the supreme court, claiming the way it was passed violates the constitution.
The law will cost producer states billions in revenue - money Rio de Janeiro says it can ill afford to lose as it prepares to host the 2016 Olympic Games and revamps its Maracana stadium ahead of the 2014 soccer World Cup which Brazil will host.
Oil producing states and Rousseff herself pushed for provisions ensuring that only royalties from future oil contracts would be shared, but non-producing states, which have a majority in congress, knocked down those changes, granting themselves a bigger share of royalties from existing production.
The presidency press office confirmed on Thursday that Rousseff had signed the bill into law, having exhausted means by which she could block this latest version of the law.
The decision would be published in the official government journal on Friday, press officials said.
Rousseff has argued that distribution of royalties from existing production should be left unchanged to avoid interfering with existing contracts.
The distribution of royalties does not directly affect companies in Brazil's oil sector but the South American country will not resume auctions of oil concessions suspended in 2007 until a new regime for distribution of royalties is finalized.
An official from governmental national petroleum agency, ANP, estimated on Thursday that royalties from nationwide oil production in 2013 would rise to 33.2 billion reais ($16.88 billion) up from 31.5 billion in 2012, according to the senate news service.
($1 = 1.9672 Brazilian reals) (Reporting by Jeferson Ribeiro, Writing by Peter Murphy; Editing by Michael Perry)