America’s most populous state is losing its young people.

California’s youth population fell by more than 400,000 over the past decade to 8.9 million, largely due to a decline in immigrant inflows and a falling birth rate, according to the latest Census data. The population grew for all the state’s older age-groups, highlighting the demographic challenge of an aging workforce in the coming generations.

The decline in young people is a common trend in the U.S., where 30 states recorded a drop in the under-18 age bracket between 2010 and 2019, according to recently released data.

Chalk up the decline in California primarily to people having fewer babies, said Stephen Levy, director of the Center for Continuing Study of the California Economy, a research group. The state’s birth rate is at the lowest in history. Other experts suggest falling foreign immigration and more out-migration to other states also are hurting California.

“There aren’t enough kids in the pipeline to fill all the jobs of retiring people,” Levy said. “We’re going to need immigration and housing policies that pull people from around the world and the country into California.”

The state may increasingly struggle to lure and retain young people if the cost of living keeps rising in urban centers, including for housing, and traffic jams aren’t addressed.

“California had a particularly bad end of decade due to smaller immigration, greater out-migration to other states and fewer births,” said William Frey, a senior fellow at the Brookings Institution. “Some of this is economically driven and not pre-ordained for the next decade, if immigration picks up and the job scenario and cost of living scenario improve.”

America’s population trends have ramifications for politics, including influencing the redrawing of voter maps. California—a solidly Democratic state which has never lost a U.S. House of Representatives seat—is expected to lose one during the next reapportionment, and its declining youth population suggests it could shed additional spots in the future.

At the other extreme, Texas led all states in growing the youth population, which rose to 7.4 million last year from 6.9 million in 2010.

Texas has one of the highest birth rates in the U.S., along with strong in-migration from places like California and New York and rising immigration from Asia, putting the Lone Star state in a good position, said Lloyd Potter, the state demographer.

“We grew more than any other state, but half of our population change is from more births than deaths,” Potter said.

This article was provided by Bloomberg News.