Five years ago, SolarCity ruled the rooftops.

No other company in the fast-growing solar industry installed nearly as many panels on American homes. The pace of installation was accelerating quarter after quarter, leaving such rivals as Sunrun and Vivint far behind.

Then electric auto manufacturer Tesla bought the company. Now, what once was SolarCity appears to be fading away.

Installations have plunged 62 percent. Reuters, citing internal Tesla documents, recently reported the company is closing a dozen installation facilities across the country, part of a broader restructuring within Tesla that cut 9 percent of the company’s workforce. In announcing the cuts to Tesla staff, CEO Elon Musk also said the company will stop selling solar arrays through Home Depot, moving some of the salespeople involved to Tesla stores while letting others go.

As a result, analysts say SolarCity’s installations will fall further before they rebound — if they rebound.

“They haven’t really proven yet that they’re successfully able to sell solar through Tesla stores,” said Allison Mond, a senior analyst with GTM Research. “It’s quite jarring. I think the next six months will tell us a lot about where SolarCity is going.”

Many analysts at the time questioned the wisdom of Tesla’s $2 billion purchase, which came as SolarCity was facing a serious cash crunch.

Some derided the deal as Musk using one of his companies to bail out another, because he chaired SolarCity’s board of directors and his cousin Lyndon Rive was SolarCity’s CEO. They also questioned the wisdom of Tesla taking on more debt and a new line of business as it was gearing up to introduce its next car, the $35,000 Model 3, considered the linchpin of Tesla’s plans. Tesla is now struggling to ramp up production of the car at its Fremont factory.

“We never liked the deal,” said Efraim Levy, senior equity analyst at the CFRA research firm, who covers Tesla. “Ultimately, the success of Tesla is in the auto business, but you don’t want a smaller business dragging down the rest of it.”

Tesla acknowledges the drop in installations but says that a growing number of its car buyers are also purchasing the company’s energy products: solar arrays and the Powerwall home battery. The recent job cuts, it insists, won’t change the company’s overall strategy.

“Our energy products are critical to our mission to accelerate the world’s transition to sustainable energy, and we continue to expect that Tesla’s solar and battery business will be the same size as automotive over the long term,” the company said in a statement to The Chronicle. “One of the main reasons we acquired SolarCity was to use our Tesla stores to sell not only cars, but also Powerwall and solar.”

Tesla says that job cuts within its energy division, which includes both solar and energy storage, were in line with or slightly below the 9 percent rate for the entire company.

Documents Tesla filed with the state on June 15 say the company fired 86 people at its Palo Alto headquarters and 420 at its constellation of facilities in Fremont. Those facilities include two buildings into which Tesla moved much of the staff from SolarCity’s old San Mateo headquarters early this year. The documents, filed under California’s Worker Adjustment and Retraining Notification Act, give the job title of every affected worker, but only one of the jobs listed had “solar” in the title.

According to the state’s Employment Development Department, Tesla also cut 141 SolarCity jobs in Roseville (Placer County) in October, along with 63 people listed as Tesla employees in the same city.

As of December 31, 2016, a month after the Telsa purchase, SolarCity had approximately 12,243 employees, according to the company’s final annual report.

Founded in 2006 by Rive and his brother Peter, who became the company’s chief technology officer, SolarCity rose to prominence by offering solar leases. The company would install and own the arrays it placed on rooftops, while homeowners who signed a 20-year lease got the power. As a result, homeowners could go solar while paying no money up front.

The company grew quickly, commanding 33 percent of the residential solar market in 2015, according to GTM Research. Utah’s Vivint Solar had 11 percent of the market, while Sunrun of San Francisco had 5 percent.

But in pursuit of that growth, SolarCity piled up $3.56 billion of debt, according to a March 2018 court decision allowing a shareholder lawsuit over the Tesla deal to proceed. The company also faced the real possibility of defaulting on some of its debt.

The SolarCity board, including Musk, discussed the company’s precarious finances at a February 2016 board meeting, according to the decision from Joseph Slights, vice chancellor of the Delaware Court of Chancery. Musk then pitched the idea of buying SolarCity to a special meeting of Tesla’s board on Feb. 29 of that year. The board initially rejected it, but Musk — who had talked years earlier about having Tesla sell solar arrays — persisted.

Tesla announced its offer to buy SolarCity in June 2016, and shareholders approved the deal in November. By year’s end, the two companies had merged.

SolarCity’s installations had already peaked. In the fourth quarter of 2015, the company installed enough panels to generate a maximum of 253 megawatts of electricity. A year later, quarterly installations had dropped to 201 megawatts. In the first quarter of 2018, they tumbled to 76 megawatts.

Some of the drop reflected changes hitting the entire industry.

Plunging prices for solar panels led more consumers to buy rooftop arrays outright rather than lease them, forcing SolarCity and its competitors to shift their business models and place more emphasis on sales. Regulatory changes in many of the industry’s most important states, including California, Nevada and Arizona, affected the economics for homeowners interested in going solar. Meanwhile, potential customers started to show a growing willingness to work with local installers rather than big national companies.

But Tesla’s decisions after acquiring SolarCity also contributed to the drop.

Tesla stopped door-to-door sales, which had been an important source of leads for SolarCity. Ending the Home Depot partnership will further consolidate solar sales within Tesla’s network of stores. Selling through Home Depot was not cheap — GTM estimates the average cost of acquiring a new customer through such a partnership is $7,000, compared with $4,500 per customer for door-to-door sales — but eliminating that sales channel will further erode Tesla’s solar business, Mond said.

“I understand why SolarCity is no longer doing it,” she said. “I’m just not sure they’re going to fully rebound.”

Tesla does have some advantages, however, that could help its solar sales rise again.

It expects to accelerate production of its solar roof — which integrates photovoltaic panels into glass tiles — in the second half of this year. And while other solar companies, including Sunrun, now offer home batteries, none has gained the name recognition of Tesla’s Powerwall. In other words, Tesla has products that can differentiate the company from its rivals.

“When you’re talking about residential (energy) storage in the United States, the first name that comes to mind is Tesla, and none other,” said Camron Barati, a senior analyst with the IHS Markit research firm. “This advantage they have now won’t last forever, but having that established will benefit them.”

David R. Baker is a San Francisco Chronicle staff writer. Email: dbaker@sfchronicle.com Twitter: @DavidBakerSF