Brookfield Asset Management Inc. is buying one of the two "yieldcos" of bankrupt U.S. solar company SunEdison Inc. and is taking a 51% stake in the other, for a total of about $2.5 billion.

Yieldcos are publicly traded units that hold renewable energy assets such as solar power plants and wind farms. They have long-term agreements to sell power, giving them stable cash flows.

In a statement, Brookfield says that it will acquire TerraForm Global Inc. for about $787 million and buy 51% of TerraForm Power Inc. for $1.7 billion.

Brookfield will also assume about $455 million of TerraForm Global's debt and pay $5.10 per TerraForm Global class A share, which represents a 20% premium to the stock's March 6 closing price.

TerraForm Global owns or has contracts to acquire 952 megawatts (MW) of wind and solar power in Brazil, India, China, South Africa, Thailand, Malaysia, and Uruguay.

TerraForm Power owns about 2,967 MW of solar and wind assets in the United States, Canada, the United Kingdom, and Chile.

Canada-based Brookfield owns over 17,000 MW of renewable energy assets and will replace SunEdison as TerraForm Power's sponsor once the deal closes.

SunEdison was one of the fastest-growing U.S. renewable energy company, but filed for Chapter 11 bankruptcy protection in 2016 after a series of debt-fueled acquisitions proved unsustainable.