Mover Bob Christensen of Loves Park, Illinois, beside one of his trucks. People moving for jobs or a lower cost of living helped drive population losses in eight states, the highest number in almost 30 years. © The Associated Press

Eight states lost population between 2015 and 2016, and 12 others recorded their lowest population increase of the decade, as economic woes and lower birth rates hit some states harder than others.

Connecticut, Illinois, Mississippi, New York, Pennsylvania, Vermont, West Virginia and Wyoming lost population. The last time so many states registered a drop in population was from 1986 to 1987, when oil prices collapsed. Twelve Western and Southern states, along with the District of Columbia, lost population then.

Meanwhile, Alabama, California, Hawaii, Kansas, Louisiana, Maryland, Massachusetts, New Jersey, North Dakota, Oklahoma and Virginia saw anemic growth of between 0.02 and 0.66 percent in the number of people living inside their borders. That’s less than the nation’s increase in population of 0.7 percent and the lowest growth those states had experienced since 2010.

The reasons behind the declines vary. Some reflect national mortality and birth trends, as more deaths occur as the population ages and the millennial generation has fewer babies. That has led to the slowest population growth in the U.S. in 70 years, as Brookings Institution demographer William Frey points out.

Pennsylvania, for instance, had 7,677 fewer people in 2016 than it did in 2015, after having experienced growth every year since 1996. The major reasons: an increase in deaths, a decrease in births and fewer foreign immigrants than other states have.

“There are more and more of us at ages where deaths are more numerous,” said Herbert Smith, director of the Population Studies Center at the University of Pennsylvania.

A state’s economy also plays a part. Like in 1986, the economies of energy-producing states such as Kansas, North Dakota, Oklahoma, West Virginia and Wyoming have suffered from low oil, natural gas and coal prices. People flee a state when jobs evaporate to find work elsewhere if they can.

West Virginia and Wyoming are the two largest coal producers in the country. As coal production declined, West Virginia lost 9,951 people from 2015 to 2016, its fourth straight year of population loss. Wyoming lost 1,054 after having steadily gained population since 1999.

Americans are moving again in more rapid numbers after hunkering down during the recession. And people’s ability to move, as their personal finances or job outlooks have improved, “is now critical to whether a state gains or loses population,” said Kenneth Johnson, a demographer at the University of New Hampshire’s Carsey School of Public Policy.

Aging baby boomers are moving to the Sun Belt or other lower-cost states to retire. Florida’s population, for instance, is among the nation’s fastest-growing. Workers who are able to move and get a job elsewhere will escape high cost-of-living states. And when businesses find high taxes, high labor costs or a shortage of workers and can move, they will and take the jobs with them.

Idaho, Nevada and Washington state are experiencing some of the fastest economic and job growth in the nation. And their populations are growing along with that, rising at more than twice the national growth rate from 2015 to 2016.