The people believe in Elon Musk.

Shareholders in Tesla and SolarCity, two companies that Musk co-founded, voted in approval of a proposed merger on Thursday. The tie-up received 85 percent support from Tesla's shareholders, who were widely expected to be more hesitant given the solar-power company's financial issues. SolarCity shareholders approved the deal earlier in the day.

Tesla will buy SolarCity in a stock-based deal that amounts to about $2.3 billion. SolarCity stockholders will receive 0.11 shares of Tesla for each share they currently own.

Musk has been championing the deal since first proposing it in June. In a July blog post, he wrote that it was an "accident of history" that the two companies were ever separate, saying that merging would allow them to combine their technologies and operate more efficiently. The agreed-upon offer was officially announced August 1.

It was widely maligned in the following weeks. Critics pointed to SolarCity's solvency--the company lost $768 million last year and is $3 billion in debt--as well as Musk's involvement in both companies. Musk is the primary shareholder of both Tesla and SolarCity. He serves as CEO of Tesla, while his cousin, Lyndon Rive, is CEO of SolarCity.

Investor Jim Chanos called the deal a "brazen bailout of SolarCity" and "corporate governance at its worst." Several Tesla shareholders filed lawsuits against the company, attempting to block the vote.

Tesla, which has drawn ire from investors and analysts for its inability to turn a profit, recently has shown signs of breaking out. The company just posted its first profitable quarter in three years, exceeding Wall Street revenue expectations by $300 million. With nearly 400,000 preorders in place for its $35,000 Model 3, the company acquired German manufacturing company Grohmann Engineering earlier this month to help ramp up its production. Tesla is currently capable of producing around 100,000 vehicles per year and wants to ramp that number up to 500,000 by 2018.

By joining forces, Tesla and SolarCity will be able to offer a one-stop-shop for solar panels, electric cars, and Powerwall home batteries. "You'll be able to walk into the store, pick out a roof and a car...and then you'll love it," Musk said in a live streamed Q&A with shareholders.

The companies say they'll save a combined $150 million each year in operating costs after post-merger streamlining. Tesla expects SolarCity to add $500 million in revenue to its top line over the next three years.

SolarCity should also benefit from Tesla's brand recognition and cult-like following among some consumers. Earlier this week, Tesla's Model S was voted the most loved car in America by brand consulting firm Strategic Vision for the second time in three years.

Musk's so-called "Master Plan" for the joint company is to create fully autonomous electric cars that get their power from solar energy. On October 27, the entrepreneur unveiled new solar roofs that look like regular roofs and harvest energy with 98 percent the efficiency of standard solar panels. Tesla recently agreed to a deal with Panasonic, allowing the company to produce photovoltaic solar cells at its Buffalo, New York factory.

Earlier this month, Institutional Shareholder Services, a highly influential advisory firm, recommended that shareholders approve the deal, giving it momentum in the weeks leading up to the vote. That decision caught even Musk by surprise. "They tend to be a bit negative," he said.

Musk encouraged shareholders to vote yes in recent weeks, but announced that he would not be casting a ballot himself.

Tesla and SolarCity held their votes Thursday at their respective California headquarters. A majority vote was needed from each company for the acquisition to pass. Shareholders have been able to mail in proxy cards since October 13, allowing a representative to cast votes for them in person.

Tesla noted in a blog post that it expects the transaction to be finalized in the coming days.