Elon Musk on Thursday won backing from shareholders for his plan to combine Tesla Motors (TSLA) and SolarCity (SCTY) , with investors from both companies voting to approve the $2.6 billion merger.

The planned deal attracted a great deal of scrutiny from the moment it was announced in August, with critics worrying that the money-losing solar panel firm would be an albatross to Tesla and its electric vehicle ambitions. Musk, a major shareholder in both firms, CEO of Tesla and chairman of SolarCity, has argued that it was "an accident of history" that the two companies were formed separately, saying that combined they would create a vertically integrated clean energy titan.

The deal got a mixed review from proxy advisory firms, with Institutional Shareholder Services recommending in favor of the merger while Glass Lewis & Co. advising against. Musk, who owns more than 20% of both companies, recused himself from the vote, as did Antonio Gracias, a venture capitalist who sits on both boards and Tesla chief technical officer J.B. Straubel.

SolarCity has had a rough run of late, leading some critics to call the deal a bailout. The company is saddled with more than $1.37 billion in net debt and earlier this month revised downward the amount of solar capacity it expects to install this year. Absent additional financing deals completed in the quarter it is bleeding cash, and following the victory by President-elect Donald Trump there are fresh questions about the sustainability of tax breaks designed to make solar panels more affordable.

Investors chose to look past the risk and support Musk's vision, with Tesla saying that more than 85% of votes cast were in favor of the deal.

With the vote secure, the hard work now begins. Tesla has argued that SolarCity's recent results are not an indication of future performance, arguing that the company will benefit from a transition from leasing solar panels to selling them. Tesla has predicted SolarCity will add $500 million in cash to the combined company's balance sheet in the coming years, which would be a sharp reversal from recent trends should it happen.

Musk, speaking to shareholders at the company's special meeting, thanked investors for their vote and said "I think your faith will be rewarded."

Musk also argued that the changing political landscape should not hurt his company, saying that Tesla is not reliant on clean energy subsidies. Because the vehicle credits are capped for individual manufacturers, he argued that a loss of credits would actually impact competitors who have made fewer electric vehicles to date more than it would impact Tesla.

"We don't think that would be a good thing for the world, but it would be a good thing for Tesla," he said.

More from Stocks

Trump's 'Space Force' Could Launch a $1 Trillion Industry, Morgan Stanley Says

Trump's 'Space Force' Could Launch a $1 Trillion Industry, Morgan Stanley Says

Abiomed Stock Should Rise Some 12% From Here, Piper Jaffray Analyst Says

Abiomed Stock Should Rise Some 12% From Here, Piper Jaffray Analyst Says

Video: Here Is Why Carvana Isn't Worried About Amazon

Video: Here Is Why Carvana Isn't Worried About Amazon

Video: What Oprah's Content Partnership With Apple Means for the Rest of Tech

Video: What Oprah's Content Partnership With Apple Means for the Rest of Tech

REPLAY: Jim Cramer on the Markets, Oil, Starbucks, Tesla, Okta and Red Hat

REPLAY: Jim Cramer on the Markets, Oil, Starbucks, Tesla, Okta and Red Hat