The number of U.S. solar jobs fell for the first time on record last year as companies scaled back operations in anticipation of tariffs imposed by President Donald Trump.

The sector lost about 9,800 jobs in 2017, a 3.8 percent drop, according to a Feb. 7 report from the Washington-based Solar Foundation, a research group. It’s the first pullback since the group began counting jobs in 2010. The industry now employs about 250,000 people.

A trade...