Solar and wind power company SunEdison Inc. said it would buy Vivint Solar Inc. in a deal valued at about $2.2 billion, including debt, to expand in the residential and commercial solar power business.

SunEdison earlier this year bought Massachusetts-based wind power developer First Wind, which has projects operating and in the pipeline in Maine, for $2.4 billion.

SunEdison has offered Vivint shareholders $9.89 in cash, $3.31 in stock and $3.30 in notes for every share held.

The offer works out to $16.50 per share, a 51.7 percent premium to Vivint’s Friday close. Vivint’s shares were up 44 percent in premarket trading on Monday.

Demand for rooftop solar systems is booming due to falling equipment costs that have allowed startups to sell power at prices lower than those offered by traditional utilities.

Vivint, the second-biggest installer of rooftop solar panels behind Elon Musk-backed SolarCity Corp., has operations in seven states including California and New York. The company went public last October.

SunEdison said its unit, TerraForm Power Inc., would subsequently buy Vivint’s rooftop solar portfolio of 523 megawatts, expected to be installed by year-end 2015, for $922 million in cash.

BofA Merrill Lynch advised SunEdison, while Morgan Stanley & Co LLC acted as Vivint Solar’s adviser.