As expected, Tesla Motors has announced that it will be merging with solar technology firm SolarCity for $2.6 billion.

The electric car maker revealed that this is going to be an all-stock transaction.

According to Tesla CEO Elon Musk, this deal will be the second phase of the company’s master plan, which involves developing solutions to generate, store and enable mass consumption of solar energy.

As per the master plan, the combined company plans to scale Tesla’s Powerwall energy storage device and develop more solar products.

They will leverage Tesla’s wide network of retail locations to sell its wares.

The deal is expected to wrap up in the fourth quarter of 2016.