Engie said on Monday its successful offer for a 90 percent stake in TAG was made alongside Canada's state-owned financial and investment firm Caisse de Dépôt et Placement du Québec, with more than $310 billion (£237.5 billion) under management.
Petrobras will keep the remaining 10 percent.
Engie said buying TAG, which accounts for 47 percent of Brazil's entire gas infrastructure and achieved core earnings of $1.14 billion in 2018, would provide a steady stream of profits.
It will add to Engie's presence in Brazil, where its unit owns assets including hydroelectric plants, thermoelectric facilities and renewable energy sources.
"Our acquisition of TAG is a significant milestone for Engie in Brazil, a key market for the group where we have been present for 23 years," said Engie Chief Executive Isabelle Kocher.
Under Kocher, Engie has been focusing investments on energy services, renewable energy and infrastructure, while selling out of coal-related assets.
"It is a good diversification for Engie," said Clairinvest fund manager Ion-Marc Valahu, whose firm owns Engie shares. "Also, Engie will benefit from growth expectations in Brazil."
Engie said the acquisition of TAG would result in its net debt increasing by around 1.6 billion euros ($1.8 billion). The consortium secured around $6 billion in financing to help fund the acquisition from 10 banks, three local and seven international. It did not name the lenders.
Engie shares edged up 0.6 percent in early trading on hopes the positive elements of the TAG deal would override any concerns over the rise in Engie's debts.
"TAG will allow Engie to accelerate its development in the gas sector in Brazil, where Engie is already present in terms of the country's electricity sector," said Roche Brune Asset Management fund manager Gregoire Laverne, who said Engie was a stock his firm was considering buying.
The TAG divestment represents a victory for Petrobras' leadership and its Chief Executive Roberto Castello Branco, who is pushing to unload assets in a bid to cut debt and refocus on exploration and production.
In September 2016, Petrobras sold a larger gas network pipeline, Nova Transportadora do Sudeste, for $5.2 billion to Brookfield Infrastructure Partners LP, which beat out a bid by Engie.
(Reporting by Sudip Kar-Gupta; Editing by David Holmes)
By Sudip Kar-Gupta