SAO PAULO, Oct 9 (Reuters) - Brazilian fuel distributor Vibra, formerly known as Petrobras Distribuidora SA, has reached a 3.25 billion reais ($590 million) deal to acquire up to a 50% stake in energy trading company Comerc, a Vibra statement said late on Friday.

Comerc, Brazil's fourth largest energy trading firm, will drop plans for an initial public offering, Vibra said, adding that its board of directors has approved the deal. Brazil’s antitrust regulator CADE must still approve the deal.

Vibra will make the acquisition via 2 billion reais of debentures convertible into 30% of common Comerc shares, plus an option to acquire another 20% of Comerc common shares for 1.25 billion reais. The debentures will have a maturity of 4 years, convertible into common shares before Feb. 28, 2022, Vibra said.

Comerc had been pursuing an IPO to raise about 1.5 billion reais ($272.16 million) and had secured with eight fund managers a total of 1.2 billion reais, but ended up choosing the M&A deal with Vibra instead, Reuters reported earlier.

The Comerc acquisition in another step in the repositioning of Vibra as an energy company focusing on the transition towards a low-carbon economy, the statement said.

In a series of deals to expand its business, Vibra announced in August the forming of an ethanol trading joint-venture with Copersucar, which will receive 440 million reais in investments.

Comerc, one of Brazil's main energy retailers, currently has a portfolio of products and services that reach a traded energy volume of approximately 2 GW average with more than 3,400 consumer units under management.

With its reorganization, the company becomes the owner of solar generation parks whose installed capacity amounts to 1,839 MWp, with 242 MWp in operation and the rest under development.

"In the coming years, Comerc will be one of the main investors in solar generation in the country," it said.

($1 = 5.5115 reais) (Reporting by Carolina Mandl Editing by Alistair Bell)