California’s population continued to shrink in 2021 as the nation’s most populous state posted its second consecutive decline, state officials said Monday.

California lost 117,552 people in 2021, bringing its population to 39,185,605.

That’s still the largest in the country ahead of second-place Texas. But after years of steadily approaching 40 million residents, California’s population is now back to where it was in 2016.

State officials blame the loss on a declining birth rate coupled with an increase in deaths, mostly because of COVID-19. Fewer people are moving to California from other states. And state officials say federal immigration policies have drastically curtailed the number of people moving here from other countries.

Long Beach, however, bucked the trend. The city’s population grew by 925 people to 460,682, an increase of 0.2%, according to the State Department of Finance, which released the report Monday.

Most other large cities in the state lost residents, with only Bakersfield, Fresno, San Diego and Long Beach showing any population growth among California’s 10 biggest cities.

California’s overall population declined for the first time in 2020, the result of a multi-year slow-down in growth that led to the state losing a seat in Congress after the 2020 U.S. Census.

The state also lost population during the 2021 fiscal year, which ended on June 30.

Thirty-four of the state’s 58 counties lost population last year. That includes Los Angeles—the nation’s most populous county with 9.8 million residents—and San Diego and Orange counties, which together make up three of the most populous counties in the country.