A slowdown in the rooftop solar industry did not bode well for SolarCity in 2016.

The largest solar energy installation company in the United States slashed its staff by nearly 20 percent to preserve cash that year, according to a regulatory filing on Wednesday. The cuts affected workers in operations, installations, manufacturing, sales, and marketing, according to the filings.

The news comes as the nation’s solar industry is in a state of flux. Low oil prices and the fracking boom have stalled solar growth. But the solar and wind industries are predicted to explode in the coming years, growing from their modest share of the electricity market today.

For now, though, SolarCity, the nation’s top rooftop solar installer, is trying to hold onto cash. To do so, it cut its workforce by 19.8 percent, filings for the end of 2016 showed. That year, it said it had 12,245 employees. It reported a year earlier that it had 15,273.

SolarCity had announced job cuts before it was acquired by Tesla in late 2016, but it hadn’t said by how much it planned to reduce its workforce.

The news is at least a temporary reversal of fortune for a company that rapidly rose to prominence. Chaired by Elon Musk and founded by his cousins, SolarCity ascended to the top of the solar industry through its no-money down financing schemes and vast sales operation. At one time, the company aimed to have 1 million customers by 2018.

But it scaled back its plans at the end of 2015 as costs grew and demand began to shrink.

After SolarCity had agreed to be acquired by Tesla, the company said it would move to spend less on advertising, in part by preparing to sell its systems in Tesla’s own stores.

Mr. Musk spoke about this vision in his “Master Plan, Part Deux” he released last summer. In it, Musk said he aims to give consumers an integrated low-carbon power system: SolarCity panels to gather energy and Tesla lithium-ion batteries to store it and power their homes (and plug-in vehicles).

“The point of all this was, and remains, accelerating the advent of sustainable energy, so that we can imagine far into the future and life is still good,” wrote Musk. “That's what 'sustainable' means. It's not some silly, hippy thing – it matters for everyone.”

"Instead of making three trips to a house to put in a car charger and solar panels and battery pack, you can integrate that into a single visit," he later told reporters. "It's an obvious thing to do."

The master plan came on the heels of solar emerging as a significant job creator in the United States. In 2015, one out of every 83 new jobs created economy-wide was in the solar industry, according to a report released last year by the Solar Foundation, a non-profit research firm. All told, the solar energy sector employed 208,859 people in 2015, adding 35,052 new jobs from the previous year – spurred by growing concerns about global warming as well as the falling cost of solar energy, experts said at the time.

But low oil prices and the fracking boom have led some analysts to worry that renewable energy sources could begin to fall on the list of government priorities.

Meanwhile, public support for solar and wind remain high in the United States, even crossing party lines. According to a survey from the Pew Research Center, 89 percent of Americans say they favor more solar panel farms, while 83 percent support more wind turbine farms. About 41 percent of Americans said they had thought seriously about installing solar panels at home, citing cost savings and environmental impact, with 4 percent actually having done it.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

Analysts also expect this last number to rise in the coming years. By 2050, solar could go from 1 percent of the electricity market to the world’s biggest source, the International Energy Agency predicted last year.

This report contains material from Reuters.