(The Hill) – The average U.S. life expectancy shortened by seven months in 2021, according to new data from the Centers for Disease Control and Prevention (CDC), driven mainly by COVID-19 and drug overdoses from synthetic opioids.

According to a pair of CDC reports, life expectancy dropped for the second consecutive year, from 77 years to 76.4 years. This follows a major drop of 1.8 years in 2020, putting life expectancy from birth at about the same level it was in 1996.

Every age group in the nation — from 1-year-olds to people age 85 and older— saw a decrease in life expectancy. Life expectancy for women is 79.9 years, about six years longer than men, but they both experienced the same decline.

Almost all racial groups also saw an increase in death rates, with the exception of non-Hispanic Asian males and non-Hispanic Black males, which saw a slight decrease.

Nine of the 10 leading causes of death in 2020 were the same in 2021. Heart disease was the main cause of death, followed by cancer and COVID-19, which took nearly 417,000 lives last year — an increase of 18.8% from 2020, despite the release of new vaccines.

About 3.46 million people died in the U.S. last year, according to CDC, an increase of 80,502 more deaths than in 2020. Deaths by suicide and from liver disease caused by alcohol also increased, contributing to the shorter American lifespan. Flu and pneumonia rates decreased, as parts of the U.S. population took precautions against the coronavirus and wore masks.

Drug overdose deaths have been rising over the past two decades in the United States, CDC said. In 2021, overdoses were responsible for 106,699 deaths.

Drug overdose death rates increased for each race and Hispanic-origin group, with the exception of non-Hispanic Asian people between 2020 and 2021.

Overall, overdose death rates rose by 14% in 2021 compared to 2020, driven mainly by the illegal synthetic opioid fentanyl. According to the report, there was a 22% increase in overdose deaths from synthetic opioids in 2021.

Deaths from methamphetamine and cocaine also rose sharply last year, though overdose deaths may involve multiple drugs; as a result, a death might be included in more than one category, the CDC said.

One category of drugs that fell last year was heroin: Overdose deaths from heroin decreased 32% over the previous year, the CDC found.