Vale SA , the world's No. 2 iron-ore producer, raised its outlook for legal losses nearly five-fold to $22.4 billion as courts moved closer to allowing Brazilian tax authorities to levy overseas investments.

The potential losses, reported late Thursday in the notes of the company's financial accounts, refer to unprovisioned contingencies. The contingencies are related to lawsuits where Vale's lawyers believe the Rio de Janeiro-based company faces reasonably possible but not probable losses.

The bulk of the increase is related to a $14 billion Brazilian court ruling in November requiring Vale to pay Brazilian income taxes on profits of foreign subsidiaries even if the foreign unit already paid taxes to the overseas tax authority and other related double taxation cases.

Vale has appealed the ruling. Double taxation is outlawed in many countries. Vale is Brazil's most international company with operations and offices in dozens of countries in South and North America, Asia, Africa and Australia.

If Brazil were to win this ruling and Vale would have to pay, it would be a danger not just to Vale but to many other Brazilian companies as well, said Felipe Reis, metals and mining company analyst with Banco Santander in Sao Paulo. Some of them would not be able to pay the costs involved.

The amount at risk threatens Vale, the world's leading iron ore producer, with losses nearly 50 percent greater than its entire fourth-quarter sales of ore, nickel, copper, silver, railway and ship transport capacity and other metals and services.

The lawsuits and contingency accounting come as the government of President Dilma Rousseff seeks to increase its control of the country's natural resources.

Earlier this year the government used its large indirect stake in the company, Brazil's largest exporter, to oust Roger Agnelli, the architect of Vale's international expansion to Canada, Africa and Asia, as chief executive.

Agnelli resisted government pressure to build more steelmills and ships in Brazil.

His replacement, Murilo Ferreira, 58, has taken a more conciliatory tone with the government and said on Thursday that the company was in discussions to resolve the tax issue and ensure that it will not be hurt by legislation, expected within months, changing Brazil's mining code for the first time in nearly a half century.

Ferreira also said he expects the company to win the tax cases and not have to make the giant payments.

Vale preferred shares, the company's most-traded class of stock, reversed early losses to gain 0.67 percent to 42.36 reais in Sao Paulo. The benchmark Bovespa index of the Sao Paulo exchange rose 1.18 percent.

(Editing by Todd Benson; Editing by Tim Dobbyn)