Michigan's population increased by 19,468 residents to 9,995,915 as of July 2018, according to U.S. Census data released Wednesday showed

It's the seventh straight year the U.S. Census Bureau announced growth for the state.

Michigan's population peaked at 10,055,315 in 2004, according to census data.

The state's growth, which was 0.2 percent, still lags the nation at 0.6 percent. Nevada and Idaho were the fastest-growing at 2.1 percent. Michigan's growth rate ranked it 38th nationally.

The data showed more residents moving in than leaving this year, with net migration at 4,649 people. That makes it three straight years Michigan has seen positive migration numbers.

"It's more than just a fluke," said the state's demographer Eric Guthrie, who has analyzed the census data. "We seem to be moving in a positive direction."

More Michigan residents still are moving to other states — an estimated 16,766 in 2018 — but that number has declined significantly. And it's offset by international immigrants coming to Michigan, which was 21,415 this year, according to the data. Since 2010, births have been declining and deaths increasing.

"National immigration policies are very important for Michigan," said Kurt Metzger, a demographer and director emeritus of Data Driven Detroit. "Migration into the state is critical."

The gains likely won't prevent Michigan from losing a congressional seat after the 2020 census.

As of now, Michigan would lose one of its 14 congressional seats after the 2020 census when comparing the growth of other states with Michigan, according to an online apportionment tool from the University of Michigan Population Studies Center.

Michigan lost one seat after the 2000 census; two after 1990 and one after the 1980 census. According to the latest estimates, Texas, Oregon, Florida, Arizona, Colorado and North Carolina would gain seats, while Michigan, Illinois, New York, West Virginia, Rhode Island, Minnesota and Pennsylvania would lose.

Nine states lost population, including New York and Illinois, which lost 45,116 or a 0.4 percent drop.