(Repeats for additional clients with no changes to text)
By Tatiana Bautzer
SAO PAULO, May 21 (Reuters) - Rampant corruption scandals and a deep recession soured many foreign investors on Brazil in recent years, but one Canadian group saw opportunity.
Brookfield Asset Management Inc and its subsidiaries have made nearly a dozen major acquisitions there since 2013. The companies have spent about $10 billion on energy, infrastructure and real estate assets few others would touch due to the legal, political and economic risks involved.
"A crisis is a good time to find value," said a person close to the group, who called Brookfield a "contrarian investor."
That includes buying assets from companies entangled in the blockbuster "Car Wash" investigation, which jailed dozens of businessmen and politicians. The deals confirmed Brookfield's reputation as one of the strongest-stomached investors in Brazil.
In 2016, for example, Brookfield Infrastructure Partners LP led a $5.2 billion acquisition of a pipeline operator from Petroleo Brasileiro SA, the state-controlled oil company at the heart of the Car Wash scandal. Recently, another Petrobras pipeline network with half the capacity fetched a top bid of around $8 billion from other investors. Bargain-hunting Brookfield gave that deal a pass.
The Canadians' savvy is built on nearly 120 years of experience in South America's largest economy. But the recent buying spree pushed the company to new extremes of due diligence and bulletproofing, according to interviews with six people involved in the deals.
The company declined to comment on investments in Brazil, which account for about 15 percent of its $286 billion portfolio and represent its biggest market after the United States.
Chief Executive Bruce Flatt, whom some call the Warren Buffett of Canada for his value-investing approach, called recent Brazil acquisitions "quality businesses from sellers in need of capital" in a February letter to investors.
Brookfield's purchase of gas pipeline operator Nova Transportadora do Sudeste SA (NTS) from Petrobras was part of a controversial divestment program aimed at trimming the oil firm's massive debt load.
Critics have decried the privatizations, and Ciro Gomes, a leading leftist presidential candidate, has pledged to reverse sales of state energy assets if elected this year.
Foreseeing the risk, Brookfield tasked dozens of lawyers with drafting an ironclad agreement. Brookfield has a right to compensation if Petrobras changes the contracts in a way that hurts the Canadians' cash flow, according to three people with knowledge of the matter.
The head of Brazilian investment banking at a global bank, who was not involved in the NTS deal, said it was an example of Brookfield's willingness to bet big while protecting itself.
"Everyone was stunned by their $5 billion bid at the time," the banker said. That successful deal persuaded other investors to consider bidding on the other Petrobras pipeline unit, the person added.
Analysts at Saibus Research raised their target price for shares in Brookfield Infrastructure Partners after the NTS deal, citing a boost to its recurring profit margins. Shares have climbed 18 percent to more than $38 in New York since the deal was reported.
Started in 1899 as the Sao Paulo Railway, Light and Power Company, Brookfield grew into a diversified global investment firm. Until 2005, it went by the name Brascan, a reflection of its roots as a Canadian investment firm in Brazil.
Brookfield, too, has grappled with graft allegations in Brazil.
Its homebuilding unit was among around 30 developers accused of paying bribes to building inspectors in Sao Paulo between 2010 and 2012. Former employees of the unit, which later changed its name to Tegra, confessed to paying bribes and were cooperating witnesses in the trial of the building inspectors.
Brookfield said the company was not a target of the investigation and cooperated with authorities.
In a separate case, the U.S. Securities and Exchange Commission (SEC) opened an investigation in 2012 into accusations that Brookfield's Brazil shopping mall unit bribed Sao Paulo officials to win construction permits. The SEC dropped the case in 2015 without bringing any enforcement action. Brookfield denied wrongdoing.
One of Brookfield's toughest recent deals will test its ability to avoid fallout from another municipal graft scandal.
Last year it agreed to pay $1 billion for a 70 percent stake in a sewage and water utility owned by Odebrecht SA, an engineering group ensnared in the Car Wash probe. Prosecutors accused Odebrecht of paying bribes to secure contracts with some of the 186 municipalities where the utility operates.
Odebrecht, which reached a leniency deal with prosecutors, said in a statement it is cooperating with law enforcement and "has created internal controls to detect and prevent unlawful behavior."
Some 60 lawyers working for Brookfield spent eight months assessing the risks. They arranged for $100 million of the purchase price to be set aside to cover potential liabilities if city governments break off contracts or demand compensation due to alleged kickback schemes.
Since subsidiary Brookfield Business Partners LP closed the deal in April 2017, none of the municipal contracts held by the company, now called BRK Ambiental, were rescinded and only one is in litigation, according to two people with knowledge of the matter.
Reporting by Tatiana Bautzer Additional reporting by Fergal Smith in Toronto, Luciano Costa and Carolina Mandl in Sao Paulo Editing by Christian Plumb, Brad Haynes and Marla Dickerson