SAO PAULO (AP) - A new oil law that gives a greater share of royalty revenues from Brazil's vast oil fields to non-producing states went into effect Friday and producing states filed appeals against it with the Supreme Court. The law was published in the official gazette after President Dilma Rousseff signed it Thursday. The new law shares oil royalties, from existing and future drilling and production concessions, more evenly among all of Brazil's 27 states instead of favoring top oil producers such as Rio de Janeiro, Espirito Santo and Sao Paulo states. The three state governments said on their websites they filed their appeals Friday. All three contend the legislation is unconstitutional because it breaches existing production contracts. Officials in Rio de Janeiro, the largest producing state, have said the law will deprive Rio of $1.7 billion in 2013 alone, endangering preparations for the 2014 World Cup and the 2016 Olympics. Rio state Gov. Sergio Cabral said the law would bankrupt the state and many of its municipal governments, 87 percent of which depend on oil-generated revenues. The Espirito Santo governor, Renato Casagrande, has said his state stands to lose more than 10 billion reals ($5 billion) over the next seven years. Congress approved the law late last year. The law lowers the percentage of petroleum royalties shared among producing states from 26.25 percent to 20 percent. Rousseff vetoed that provision, but Congress overrode the veto last week. Non-producing states will see their share increase from 7 percent to 21 percent, while the central government's share will drop from 30 percent to 20 percent. The rest of money goes to municipal governments in producing states.