Illinois was just one of eight states in the nation to lose population between mid-2016 and mid-2017, with much of it due to people leaving for other states, according to new estimates published Wednesday by the federal government.

Illinois' population fell by 33,703 people to just over 12.8 million, according to the estimates. The loss caused it to slip behind Pennsylvania to the 6th most populous state in the nation.

Last year it was ranked 5th.

Iowa, meanwhile, gained 14,842 people for an estimated population of 3,145,711.

The state continued to rank 30th in the nation in population.

The estimates, published by the U.S. Census Bureau, estimated population changes between July 1, 2016 and July 1, 2017.

Illinois' population loss was the worst in the country on a numerical basis, and on a percentage basis it was second from the bottom, with only West Virginia faring worse.

Most of Illinois' population decline was due to a net loss of 114,779 people moving to other states.

The state did have a net gain in the number of people moving there from other countries. Illinois also experienced a natural increase in population, meaning the number of births over deaths. But those gains weren't enough to offset the outflow of people to other states.

Iowa's gains came mostly because of a natural increase. There were 10,766 more births than deaths in the state. That and a net gain of 6,836 international migrants made up for a net loss of 2,724 people moving to other states, according to the estimates.

Iowa's population grew by half of one percent, ranking it 26th in the nation.

Idaho had the highest rate of growth, at 2.2 percent. Much of that was due to people moving there from other states.

Texas' population grew by nearly 400,000 people, the biggest numerical gain in the country.

California, Texas and Florida continue to be the most populous states, according to the estimates.

California grew to more than 39.5 million people. Wyoming, at about 579,000 people, is the least populous state.

The new estimates did not reflect the impact on Gulf state of Hurricane Harvey and Irma, which occurred in August and September, respectively.

Be the first to know - Sign up for Breaking News

* I understand and agree that registration on or use of this site constitutes agreement to its user agreement and privacy policy.

Idaho in Nation's Fastest-Growing State[Source: U.S. Census Bureau]