After years of lagging behind those in other states, Pennsylvania's solar industry is making substantial gains to catch up.

Jobs in the state's solar sector increased by 26 percent to nearly 4,000 people in 2017, according to an annual census released by the Solar Foundation, a Washington-based nonprofit promoting solar energy.

It was the second consecutive year of employment growth after three years of declines, a sign that solar-friendly policies at the state level — and falling equipment prices encouraging more installations — are making their mark.

The gains come as the national solar workforce fell by 4 percent, the first annual drop since the group began releasing job counts in 2010. Some of the leading solar states, including California, Nevada, Massachusetts and Texas, have experienced deep cuts as, analysts said, prices come down and utility-scale solar projects come online.

Larger installers and manufacturers were also cautious in anticipation of U.S. tariffs on solar imports. Last month, President Trump imposed those tariffs, which were as high as 30 percent on solar equipment made abroad.

"After six years of rapid and steady growth, the solar industry faced headwinds that led to a dip in employment in 2017, including a slowdown in the pace of new solar installations," Andrea Luecke, The Solar Foundation's president and executive director, said in a news release.

At the same time, Pennsylvania joined an unlikely band of states with relatively small solar industries — among them, Utah, Minnesota, Colorado, Iowa, Ohio and Tennessee — in growing jobs.

"The fact that jobs went up in 29 states is an encouraging sign that solar is taking hold across the country," Luecke said.

Last year marked a series of opportunities for Pennsylvania's burgeoning solar industry, which is hoping to catch up with its neighbors, New Jersey, New York and Maryland.

"Now we're seeing efforts both at the policy level and also just in general, among the public, to go solar," said Pari Kasotia, the Mid-Atlantic director for Vote Solar, a Washington-based advocacy group. "I'm hoping the Pennsylvania solar market continues to increase as people become more aware of the benefits."

In late 2016, SolarCity, the nation's largest residential solar installer, moved into the Pittsburgh area, joining a business community of smaller solar providers.

Also in 2017, the Pennsylvania Department of Environmental Protection gathered input from solar advocates on policy changes that would help spur growth. Gov. Wolf has said he wants to boost solar generation to at least 10 percent of in-state electricity sales by 2030.

The current solar target, set by the state legislature as part of the Alternative Energy Portfolio Standards in 2004, stands at a half-percent of electricity sales by 2021 — a target that advocates argue is far too low.

In November, Wolf launched the Solar Energy Program with $30 million in grant funding to be used for new solar installations and solar equipment manufacturing in the state.

In addition, the governor signed legislation that aims to strengthen Pennsylvania's Alternative Energy Portfolio Standards Act by requiring solar renewable energy credits used to demonstrate compliance must be generated at solar facilities delivering electricity to the grid in the commonwealth.

The Solar Foundation's report found that about half of all U.S. solar employees work to install the systems, ranging from residential and commercial rooftops to large-scale solar farms that directly feed electric utilities.

The rest of the positions were split fairly evenly among manufacturing solar modules; sales and distribution of the systems; and project development.

The group determined job counts by surveying businesses that identify as part of the industry. It's the same methodology used by the U.S. Department of Energy in previous years to determine broader clean energy job counts.

Daniel Moore: dmoore@post-gazette.com, 412-263-2743 and Twitter @PGdanielmoore.