Elon MuskREUTERS/Beck Diefenbach
Tesla shareholders voted in favor of its acquisition of SolarCity on Thursday.
More than 85% of Tesla shares voted were cast in favor of the acquisition. SolarCity's shareholders also voted in favor.
The deal is worth about $2 billion.
The transaction will be completed in the coming days, Tesla wrote in a press release.
Tesla CEO Elon Musk owns about 20% of both companies and is chairman of SolarCity. Musk is also the cousin of SolarCity's CEO Lyndon Rive.
Musk recused himself from the vote, as did J.B. Straubel, Tesla's chief technical officer who sits on Tesla's and SolarCity's boards.
Tesla will be absorbing SolarCity's roughly $3 billion in debt as part of the merger. Advisory firm Institutional Shareholder Services had recommended shareholders vote in favor of the deal. Analysts were expecting the merger to be approved ahead of the vote. 
solar roof teslaOne of Tesla's solar roof options. Tesla
In late October, Musk unveiled new solar products to show his vision for a combined company with SolarCity.
The main product was a solar roof that Tesla created in conjunction with SolarCity. Musk showed off four seperate solar roof shingle options, which were made with glass developed by Tesla's new glass division.
Musk claims the roof, which looks like a normal roof, will have the most efficient solar cells at the lowest price. On Thursday after the shareholder vote, Musk said that Tesla aims to get the cost of its solar roof down to the same price as installing a normal roof. 
Musk also unveiled an improved version of Tesla's at-home battery in October. Called the Powerwall 2.0, it can store 13.5 kWh of energy.
Musk is pushing into solar during a potentially difficult time under President-elect Donald Trump, a known climate denier who puts the fate of solar subsidies into question.
Angelo Zino, an equity analyst at CFRA Research, wrote in a Nov.9 research note that a Trump presidency is bad for the solar industry as it could negatively impact solar subsidies.
"We believe a Trump presidency along with a Republican-led Congress poses significant risks to a potential reduction/elimination of the 30% ITC [Solar Investment Tax Credit], extended at the end of '15," Zino wrote.