Hannah Arsenault, left, takes a yoga class from Jossyln Jalbert during the Lewiston Youth Advisory Council's Celebration event at Mike McGraw Park in Lewiston, Maine, Saturday, June 25, 2022. Credit: Andree Kehn / Sun Journal via AP

Maine was the only U.S. state that saw its population trend younger between 2020 and 2021, although it remains the oldest state in the U.S., new data show.

It is the latest example of how Maine’s population has bucked long-term trends since the onset of the COVID-19 pandemic. The state has seen among the greatest percentage population increases in the U.S. over the past two years because of people moving in, even as deaths have continued to outpace births here.

The median age in Maine dropped to 44.7 last year, down only slightly from 44.8 the year prior, according to census estimates released Thursday. That means half of Mainers are younger than that age and half are older. It is the first time in more than two decades that the median age in Maine has dropped, according to the U.S. Census Bureau.

By contrast, the median age across the U.S. rose from 38.5 in 2020 to 38.8 last year. Forty-six states and the District of Columbia saw their median ages rise, while the figure was unchanged in three states. The Census Bureau attributed the national jump — the largest single-year increase in the past two decades — primarily to declining birth rates.

Maine remains the oldest state in the U.S., the data show, while New Hampshire came in second with a median age of 43. Four of the seven states with the highest median ages are in New England.

Within Maine, Lincoln County has the oldest median age at 51.2 years, followed by Piscataquis County at 50.8 years. Androscoggin County is the youngest county with a median age of 41 years, while Cumberland County is the second-youngest at 42.1 years.