SAO PAULO — 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.

Earlier on HuffPost:

Loading Slideshow...
  • Rio de Janeiro Protest

    Brazilian natives occupying the old indigenous museum next to the Maracana stadium, hold an own protest, as thousands demonstrate demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    People hold banners during a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    A man carries a flag during a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    People shout slogans during a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    Security personnel push demonstrators demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    Brazilian natives occupying the old indigenous museum next to the Maracana stadium, hold an own protest, as thousands demonstrate demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    People hold banners during a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    Rio de Janeiro's mayor Eduardo Paes (2nd L) and Rio's governor Sergio Cabral (4th L) walk during a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Paes and Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    People hold signs during a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    A woman holds a sign during a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO ANTONIO SCORZA (Photo credit should read ANTONIO SCORZA/AFP/Getty Images)

  • Rio de Janeiro Protest

    Security personnel push demonstrators demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    People hold a huge banner during a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    Hundreds of people march and shout slogans during a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    A group of activists shout slogans against thousands of demonstrators demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)

  • Rio de Janeiro Protest

    A student with painted face takes part in a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO ANTONIO SCORZA (Photo credit should read ANTONIO SCORZA/AFP/Getty Images)

  • Rio de Janeiro Protest

    Hundreds of people take part in a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO ANTONIO SCORZA (Photo credit should read ANTONIO SCORZA/AFP/Getty Images)

  • Rio de Janeiro Protest

    Hundreds of people take part in a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO ANTONIO SCORZA (Photo credit should read ANTONIO SCORZA/AFP/Getty Images)

  • Rio de Janeiro Protest

    Protestors cover themselves from the rain during a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO ANTONIO SCORZA (Photo credit should read ANTONIO SCORZA/AFP/Getty Images)

  • Rio de Janeiro Protest

    Hundreds of people take part in a demonstration demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO ANTONIO SCORZA (Photo credit should read ANTONIO SCORZA/AFP/Getty Images)

  • Rio de Janeiro Protest

    A group of activists shout slogans and gesture against thousands of demonstrators demanding Brazilian President Dilma Roussef to veto a bill that would redistribute oil royalties in favor of non-oil producing states, in Rio de Janeiro, Brazil, on November 26, 2012. Both Rio de Janeiro's mayor Eduardo Paes and governor Sergio Cabral warned that the new oil royalties share-out plan will jeopardize the financing of the 2014 World Cup and the 2016 summer Olympics. AFP PHOTO/Christophe Simon (Photo credit should read CHRISTOPHE SIMON/AFP/Getty Images)