The American solar power workforce shrank for a second consecutive year in 2018, as U.S. tariffs prompted developers to delay projects and policy shifts in top solar states slowed renewable energy growth.

The U.S. solar industry shed nearly 8,000 jobs last year, according to an annual survey from the Solar Foundation, a nonprofit that advocates for solar power. The 3.2-percent drop in employment puts the industry's total headcount at roughly 242,000.

The decline marks a setback for an industry that nearly tripled its workforce in the seven years since the Solar Foundation issued it first National Solar Jobs Census in 2010. U.S. solar employment peaked at roughly 260,000 in 2016.

"Despite two challenging years, the long-term outlook for this industry remains positive as even more Americans turn to low-cost solar energy and storage solutions to power their homes and businesses," Andrea Luecke, president and executive director at The Solar Foundation, said in a press release.

The drag on 2018 hiring began the previous year, as the market braced for tariffs on imported solar panels and modules after the U.S. Commerce Department determined cheap imports had hurt U.S. manufacturers. President Donald Trump ultimately authorized a 30-percent import tax on imported solar equipment.

Without clarity on pricing, many developers hit pause on projects, especially large solar farms, over the last two years. The solar tariffs, along with the Trump administration's import taxes on steel and aluminum, have made hardware more expensive. The duties on solar equipment last for four years and drop by 5 percent each year.

Over the last two years, firms that install solar equipment saw the biggest declines, shedding about 10,000 jobs or 6 percent of the workforce.

At the state level, solar power leader California and other parts of the country with mature markets experienced a pullback in employment. California alone lost 9,576 positions, seven times the decline in Massachusetts, the next biggest job cutter.

The Golden State experienced the weakest growth in solar capacity in six years during the third quarter of 2018. The Solar Foundation points to trouble getting community solar projects off the ground and uncertainty over rate structures. But solar deployment also slowed at least in part because utilities face less pressure after brisk progress hitting California's clean energy goals in recent years.

In Massachusetts, a delayed release of the state's new solar incentive program curbed new deployments, according to the Solar Foundation.

Still, 29 states added solar power workers in 2018. Florida led the job growers with 1,769 new positions to overtake Massachusetts as the nation's second biggest solar employer.

This year, the Solar Foundation forecasts hiring will pick up again, rising by about 7 percent to 259,000 jobs, based on responses to the 2018 census. New utility-scale projects are expected to drive the growth, with solar farm construction anticipated in California, Texas, Florida and South Atlantic states.

However, the Solar Foundation warns its forecast could be undercut by economic conditions, barriers to capital and changes in policy. The 2018 census also finds companies in the solar industry are having a harder time hiring as the U.S. labor market tightens.

The census was conducted by BW Research Partnership, a research consulting firm. BW's results come from a survey of 3,493 solar power companies, out of a universe of 13,945 employers, conducted in September and October 2018.