SACRAMENTO, Calif. (AP) — California had its slowest recorded growth rate in its history last year as the country’s most populous state was hit by a slowdown in immigration and a sharp decline of births.

Estimates released Wednesday show California had 39.9 million people as of Jan. 1, adding nearly 187,000 people for a growth rate of 0.47% — the lowest since 1900, the earliest records available. And while thousands lost their homes after last year’s deadly wildfire in the northern part of the state, initial estimates show most people shuffled to cities closest to the blaze.

California’s population has been creeping toward 40 million people, viewed as a milestone for a state that began as a frontier outpost and now boasts the world’s fifth largest economy. While the state will surely reach that peak, officials on Wednesday noted the latest estimates should temper expectations for robust growth as births decline, deaths rise and immigration slows.

“We see that as a process of maturity,” said Ethan Sharygin, a demographer with the California Department of Finance.

Despite the slowdown, California remains by far the country’s most populous state. Texas at No. 2 is still shy of 30 million people.

The Northern California city of Chico added more than 19,000 people for a whopping 20% increase to more than 112,000. But that was prompted by tragedy, as the nearby town of Paradise lost 83% of its population after the most destructive wildfire in state history.

“In a single word, it’s been overwhelming,” said Mark Orme, Chico’s city manager, of the overnight population growth.

The college town, home to California State University-Chico, has been affected broadly, including increases in toilet flushes and volume of trash. Orme also said traffic collisions are up 24%. Traffic is up about 25% on average and is as high as 77% in some places, he said.

Doriane Regalia, a real estate agent with Century 21 in Chico, said all her clients lost their homes in the fire. She said for some, the idea of going back to the town is too overwhelming. “There is a lot of PTSD in people who lost everything,” Regalia said.

The fire destroyed more than 14,600 housing units. But Sharygin said most of those people stayed in California. Only about 400 left the state, according to initial estimates.

“People were just reacting immediately to the loss of a home and finding a short-term solution,” he said. “I don’t think we can make any claims right now about what happens in the first quarter of this year.”

State officials said Wednesday they expected the state’s birth rate to decline, but they were surprised by how much: More than 18,000 fewer births than the previous year. Tina Daley, chief of California’s Demographic Research Unit, noted teen pregnancy rates are declining and, in general, people are waiting longer to have children.

What has surprised them, Sharygin said, is that fewer people are coming to California from other countries, especially neighboring Mexico, where birth rates are higher. Now, he said, more people are coming from places like China, where birth rates are lower.

The new population estimates come as the state is preparing for the 2020 national census, an important head count used to distribute federal tax dollars and decide congressional representation. State officials are concerned many Hispanics won’t be counted if the Trump administration succeeds in placing a citizenship question on the census form.

State officials expect California to continue to grow, predicting the state’s population could top 50 million by 2055. By 2051, officials project the state will join Japan and other European countries by having more deaths than births.