(Updates with final prices, Mexico details) BRASILIA, Jan 24 (Reuters) - Brazilian markets surged on Wednesday as an appeals court upheld a corruption conviction that could stop former President Luiz Inácio Lula da Silva from running in this year's presidential race, adding to a global emerging market rally. The benchmark Bovespa stock index hit an all-time high above 83,000 points as three appellate court judges voted to uphold convictions against Lula for taking bribes and money laundering. They also added 2-1/2 years to his sentence, condemning him to 12 years in prison. Lula, who has railed against President Michel Temer's austerity platform and is leading opinion polls for the October election, can still appeal the decision. An electoral court must make the final ruling on any candidacy, and would only do so once a candidate had registered. Blue-chip Brazilian stocks such as lenders Itaú Unibanco Holding SA and Banco Bradesco SA and state-controlled oil firm Petróleo Brasileiro SA, or Petrobras, were among leaders of the bourse's upswing. The rally spread to neighboring Argentina, whose Merval stock index rose 3.11 percent to hit a record high of nearly 35,000 points, boosted by the local listing of Petrobras shares, which jumped by over 11 percent. One of the few Brazilian shares to take a knock was wood pulp producer Fibria Celulose SA, which could see the value of its exports fall as the Brazilian real appreciates. The real firmed 2.44 percent, the biggest gainer among Latin American currencies amid broad U.S. dollar weakness. The dollar slid to a three-year low against a basket of currencies after the U.S. Treasury secretary said he welcomed weakness in the currency. In a break with the traditional strong dollar mantra, Treasury Secretary Steven Mnuchin said the weaker dollar was positive for American trade. Currencies from Mexico, Chile and Colombia all firmed by over 1 percent. Colombia's peso gained 1.48 percent, reaching its strongest level since July 2015, also boosted by rising oil prices. Helping to support demand for the Mexican peso were upbeat comments by negotiators meeting in Montreal to overhaul the North American Free Trade Agreement.
Key Latin American stock indexes and currencies at 2240 GMT:
Stock indexes daily % YTD % change change
MSCI Emerging Markets 1261.79 0.24 8.66 MSCI LatAm 3169.96 3.88 12.09 Brazil Bovespa 83680.00 3.72 9.53 Mexico S&P/BMV IPC 50746.93 0.97 2.82 Chile IPSA 5798.25 -0.03 4.20 Chile IGPA 29134.71 -0.07 4.18 Argentina MerVal 34948.56 3.11 16.24 Currencies daily % YTD % change change
Brazil real 3.1590 2.44 4.88 Mexico peso 18.5040 1.03 6.46 Chile peso 602.80 1.05 1.97 Colombia peso 2813.65 1.48 5.98 Peru sol 3.213 0.19 0.75 Argentina peso (interbank) 19.6525 -1.65 -5.36 Argentina peso (parallel) 19.98 -0.75 -3.75
(Reporting by Bruno Federowski; Editing by Meredith Mazzilli and Leslie Adler)