Elon Musk’s Tesla Motors Inc. officially moved beyond cars and became a clean-energy company Thursday, as shareholders overwhelmingly approved the acquisition of SolarCity Corp. The deal, valued at about $2 billion, will integrate the maker of all-electric cars and batteries with the installer of rooftop solar panels. More than 85 percent of Tesla shares voted in favor of the merger.

Automotive industry deals and its products have been receiving robust attention lately. Related deals include: Tesla’s recent agreement to buy German manufacturing-technology provider Grohmann Engineering GmbH; Samsung Electronics Co.’s $8 billion deal to buy auto-tech provider Harman International Industries Inc. (NYSE: HAR), angling the buyer to be the go-to supplier of in-car entertainment; Crestview Partners’ agreement to purchase Accuride Corp. (NYSE: ACW), a parts supplier for wheel manufacturers, for $124 million; Grakon LLC’s acquisition of Hamsar Diversco Inc., a maker of lighting and electronics for automobile manufacturers; Watermill Group’s purchase of parts supplier Experi-Metal Inc; and Trivest Partners’ sell of Take 5 Oil Change Inc. to Driven Brands, backed by Roark Capital.

The SolarCity deal, which sparked controversy over debt and corporate-governance concerns, is a win for Musk’s vision of Tesla as one-stop shopping for consumers eager to become independent of fossil fuels. Now comes the task of integrating two companies that have a track record of fleeting profits and frequent fundraising needs–not to mention thousands of employees.

“We’re trying to make an integrated product,” Musk said during a meeting with Tesla shareholders in Fremont, California, Thursday. “So you have an integrated solar roof with a Powerwall and an electric car, and you just go into a Tesla store, just say yes, it just happens. It all works, it’s seamless and you love it.”

Tesla plans to leverage its formidable brand and retail network with SolarCity’s network of rooftop solar installers and recently announced a “Solar Roof” product. It’s not clear what role Lyndon Rive, SolarCity’s chief executive officer and Musk’s cousin, will play in the combined company.

“With an 85 percent vote, you’re seeing long term shareholders say we’re voting for Elon,” said Ben Kallo, an analyst with Robert W. Baird. “They’re saying ’We’re not here for the next quarter, we’re here for three or five years.’”

It wasn’t clear when the merger will officially close. SolarCity is expected to cease being a stand-alone brand, as Tesla markets its Powerwall battery for the home as a Tesla Energy Product.

“Moving forward I think SolarCity becomes a part of Tesla Energy, but I don’t think that happens overnight,” said Kallo.

During the course of his five-month campaign for the merger, Musk revealed the solar roof product on the “Desperate Housewives” set at Universal Studios in Los Angeles last month. Musk said Thursday the product will be equivalent in cost, or slightly cheaper, than a normal roof and that installations will begin in volume in mid-2017.

Musk owns 21 percent of Tesla and 22 percent of SolarCity, making him the largest shareholder of both companies. He and Antonio Gracias, who also serves as director at both companies, recused themselves from a board vote on the takeover July 30.

Tesla rose 2.6 percent to $188.66 at the close Thursday, while SolarCity gained 2.9 percent to $20.40. At those prices, the all-stock deal values the solar company at $20.75 a share, a 1.7 percent premium over Thursday’s closing price. The premium was about 35 percent when first announced in late June.

Tesla has lost roughly $4.8 billion in market capitalization since the initial offer, while SolarCity’s value declined by about $86 million.

The quarterly profit Tesla reported last month was the first for the Palo Alto, California-based company in eight quarters. SolarCity has recorded losses in six of the last eight quarters. The two companies have conducted five separate equity offerings since the San Mateo, California-based solar company first sold shares to the public in December 2012.

The deal drew mixed recommendations by proxy advisory firms, with Institutional Shareholder Services giving its blessing and Glass Lewis & Co. rejecting it as a “thinly veiled bailout plan.” ISS said Tesla would be able to bridge cash-burning SolarCity’s funding gap and called the deal a “necessary step” in the electric-car maker’s push to become an integrated sustainable energy company. “Tesla will def absorb SolarCity’s debt,” said Musk in a tweet earlier this month. “Although extremely unlikely, I would pay it personally if need be. Debts must be honored.”

The combined company must contend with President-elect Donald Trump, whose views on energy are a sharp departure from President Barack Obama. The real-estate mogul has vowed to roll back environmental regulations and tapped Myron Ebell, a climate-change skeptic, to head his Environmental Protection Agency transition team.

The CtW Investment Group, which works with pension funds, called on Tesla to implement corporate governance reforms, urging the company to add more independent directors to its seven-member board.

“Given the risks the company faces with increased competition, a changing political environment and its expanding product line, Tesla desperately needs to upgrade its governance structure to a standard more befitting of a public company of its size,” said CtW director Dieter Waizenegger in a statement.

Additional reporting by Mergers & Acquisitions’ Kamaron Leach