China’s population continued to decline last year—though births edged up for the first time in eight years—falling for a third straight year as deaths outpaced births.

China had seen birth numbers plummet since 2017, the year after it ended the one-child policy , despite Beijing’s encouragement of couples to have three children. At the same time, the number of deaths in China had been creeping up as the population ages.

The data for last year produced a brief reversal of the trend. Births rose to 9.54 million from 9.02 million in 2023, according to data released by the National Bureau of Statistics on Friday. That is still a far cry compared with the more than 16 million in 2015, the final year of the one-child policy.

Meanwhile, the number of deaths dropped to 10.93 million last year from 11.10 million in 2023, Friday’s data showed. That brought China’s total population to 1.408 billion last year from 2023’s 1.410 billion.

Some demographers had expected birth numbers to see a small rebound in 2024, most of which fell in the Year of the Dragon, which is seen as an auspicious one for marriage and births in Chinese culture.

The uptick in births isn’t expected to last. China’s fertility rate—the number of children a woman has in her lifetime—is less than half of the replacement rate of 2.1, meaning that each generation will be less than half the size of the one before it.

Chinese couples who delayed marriages and births during the pandemic rushed to give births in the Year of Dragon, said He Yafu, an independent demographer based in Guangdong. But he said underlying factors, such as a shrinking number of women of childbearing age and young people’s reluctance to start families, remain unchanged. “This year, births will be lower again,” he said.

According to He, the long-term trend is also that deaths will gradually rise each year as the aging of the population speeds up. In 2010, only 13% of the population fell into the 60-and-older age bracket. Now, that age group makes up over one-fifth of the population, or 22% last year, up from 21% in 2023.

In 2022, deaths overtook births for the first time . Before then, the only other year since the founding of the People’s Republic when more people died than were born was 1960, when the country suffered mass starvation as a result of Mao Zedong’s Great Leap Forward.

“As populations age, their crude death rates tend to increase,” said Joseph Chamie, a former director of the United Nations Population Fund.

China’s aging is happening fast. In the 2020 census, Chinese aged 80 or older were only 2.5% of the population, but based on U.N. estimates, they will be over 5% by the end of this year and 10% in 2050.

In other countries with aging populations, immigration often helps offset low birthrates and keep the population younger. Lower immigration is one reason U.S. deaths are expected to exceed births in 2033, seven years earlier than projected just a year ago.

China, with virtually no immigration, is stuck on a path of population decline, as deaths outpacing births becomes the new reality. The U.N. expects China’s population to drop to 639 million, less than half of what it is now, by the end of the century.

To encourage more births, Beijing has tried measures from cash incentives to longer parental leaves in recent years, part of promoting what it calls “a birth-friendly culture.” But young women are becoming more prone to resist the pressure to marry and have more children. The country’s economic downturn is also making young people hesitant to marry and start a family.

China long prided itself on a rising life expectancy and an active elderly population. Death was something few spoke of, a cultural taboo. But as the population ages, death has become a bigger part of life.

Diseases related to old age, such as Alzheimer’s, heart disease and cancer, have become a major concern in China. About 1.5 million Chinese of 60 or older were diagnosed with dementia in 2022, including 1 million with Alzheimer’s, the latest official data showed.

Elderly care is taking a toll on both families and the economy, eroding household savings and cutting into spending on other items. For many Chinese cities, sluggish economic growth and pension coffers heavily in the red are sapping vitality and making providing for the elderly increasingly daunting .

China’s death rate had hovered just above 7 per 1,000 people since 2008, but has inched toward 8 in recent years. It came in at 7.76 in 2024. The birthrate, meanwhile, edged up to 6.77 in 2024 from 6.39 in 2023.

China’s birth and death data, as published annually by the statistics bureau, aren’t absolute numbers but estimates based on survey results of a small number of households. China’s once-a-decade census is a closer representation of the true state of the population.

A wild card in counting Chinese deaths is the pandemic. In late 2022, Beijing lifted all Covid restrictions practically overnight, thrusting China into a public-health emergency as infections rapidly spread.

Two years later, the exact number of Covid deaths remains a mystery. Epidemiologists have estimated that between 1 million and 1.5 million people died from Covid-19 in China. Chinese health authorities have put the death toll far lower, at roughly 84,000.

A team led by Hong Xiao and Joseph Unger, scientists at the Fred Hutch Cancer Center in Seattle, in a 2023 study estimated excess deaths—a measure of deaths above expected levels—among Chinese 30 or older at 1.87 million between December 2022 and January 2023.

The team, which analyzed data based on three universities’ published obituaries on staff and faculty, as well as search-engine data on searches for keywords such as “funeral parlor” and “crematorium,” found that most of the excess deaths were among older individuals.

Xiao said that death surveillance data released by the Chinese Center for Disease Control and Prevention, which had been regarded among public-health professionals as comprehensive and representative, hasn’t been published for 2022 and 2023.

Write to Liyan Qi at Liyan.qi@wsj.com