Electric car maker Tesla Motors has announced that it’s agreed to merge with solar technology firm SolarCity for $2.6 billion in an all-stock transaction.

The deal builds on Tesla CEO Elon Musk’s recent revelation of the second phase of the company’s master plan, a major part of which involves developing solutions to generate, store and enable mass consumption of solar energy.

Musk happens to be the chairman of SolarCity; as per the master plan, the combined company plans to scale Tesla’s Powerwall energy storage device and develop more solar products. In addition, the firm will leverage Tesla’s wide network of retail locations to sell its wares.

Tesla noted in a blog post:

Now is the right time to bring our two companies together: Tesla is getting ready to scale our Powerwall and Powerpack stationary storage products and SolarCity is getting ready to offer next-generation differentiated solar solutions. By joining forces, we can operate more efficiently and fully integrate our products, while providing customers with an aesthetically beautiful and simple one-stop solar + storage experience: one installation, one service contract, one phone app.

The transaction is expected to wrap up in the fourth quarter of 2016. However, it’s worth noting that SolarCity has a 45-day ‘go-shop’ period from today, during which time the company is allowed to solicit alternative proposals.

Tesla and SolarCity to Combine on Tesla Blog

Read next: Healthcare giant Philips finally introduces smart gadgets to track your wellness