* Bill would change royalties for existing concessions
* Royalty changes could tie up industry in courts
* Bill could face veto from President Rousseff
* Rio de Janeiro warns change could hurt Olympics
RIO DE JANEIRO, Nov 7 Brazil's lower house of Congress passed a controversial oil and gas royalty bill on Tuesday, setting up a possible confrontation with President Dilma Rousseff who may veto the measures, stalling efforts to sell new petroleum exploration rights
The bill, already passed by the Senate and which lower house lawmakers approved by 286 to 124, raises royalties on future offshore oil development in the country's most promising "subsalt" region.
It also aims to divide oil royalties more equally for existing and future oil fields among the country's 27 states and more than 5,000 municipalities by slashing payments to the biggest producing states and municipalities that now receive the lion's share of royalty revenue.
Rousseff has voiced her strong opposition to any bill that would alter existing contracts. Changes could lead to court challenges creating legal risks for the industry and hindering plans to hold Brazil's first oil rights auctions in more than four years in 2013.
The passage of the bill is the latest episode in a five-year effort by Rousseff, her Workers' Party and her predecessor Luiz Inacio Lula da Silva to use the discovery, starting in 2007, of some of the world's largest offshore reserves to propel the country, already the world's sixth-largest economy, out of poverty.
Despite the discoveries, though, oil production has stalled at about 2 million barrels a day. Costs have soared and efforts to boost Brazilian participation in the manufacture of ships, platforms and other oil equipment and services has delayed new projects and output.
"Brazil's oil industry is passing through a tough time," Workers' Party Senator Delcidio Amaral told Reuters on Tuesday. "It has a great future in the medium and long term, but this bill causes problems."
Amaral, who despite his reservations voted for the bill in the Senate, applauded its efforts to direct oil revenues to social programs such as schools and hospitals.
He added, however, that Congress' decision to change the royalty rules for existing oil and gas concessions could lead to legal challenges and further delays in oil development.
Without a clear oil royalty bill, no new auctions of exploration rights are likely and court challenges to existing contracts could reduce interest in any new auctions, he said.
The bill sets a 15 percent royalty for new oil development under production-sharing contracts in the country's subsalt region. The New York-state-sized area off Brazil's coast near Rio de Janeiro and Sao Paulo may contain as much as 100 billion barrels of oil, enough to supply all U.S. needs for more than 14 years.
While the bill maintains a concession system and 10 percent royalty, with a provision for a windfall profits tax, for existing contracts and areas outside the subsalt, it re-directs royalties away from producing states to non-producing areas and to national funds.
Rio de Janeiro, Brazil's main producing state, says the changes would deny it much of the about 8 billion reais ($3.94 billion) in royalties it receives a year.
The state says that without that money it would be hard to pay for the 2016 Rio de Janeiro Olympic Games, its leading role in Brazil's 2014 soccer World Cup and security measures that have slashed the city's notorious violence. (Reporting by Jeb Blount in Rio de Janeiro and Jeferson Ribeiro in Brasilia; Editing by Joseph Radford)