For the second year in a row, Minnesota's largest counties saw their populations take a tumble as more people left than moved in.

The losses in Hennepin and Ramsey counties between 2021 and 2022 — reflected in data released by the U.S. Census Bureau on Thursday — weren't as hefty as the year before when COVID-19 disrupted everything from college attendance to workers retiring early.

"We are seeing these declines to a lesser extent than we saw last year," said Eric Guthrie, senior demographer at the Minnesota State Demographic Center. "But we still are experiencing a different way of living, especially when you think of our relationship to work and our connection to the workplace."

This past year's losses might be a lingering effect of what people learned during the pandemic, Guthrie said — that they could work from home. And, since they no longer had to worry as much about commuting times and gasoline prices, they could buy homes farther outside the metro area.

"Downtowns are not as full during the day as they used to be," Guthrie said, adding that in his St. Paul office Wednesday there "weren't a lot of other folks."

"When we think about the ripples of the pandemic, we are talking about a suite of circumstances that go well beyond where people work and want to work," he said.

Other factors that affect population, such as births, deaths and international migration, are all working in favor of a growing population in both counties. But according to a Star Tribune analysis of the new population estimates data, the main reason Hennepin and Ramsey's numbers keep falling is people are moving away.

Hennepin County had about 15,700 more people leave the county — for other counties either in Minnesota or other parts of the country — than moved in between July 2021 and July 2022. Ramsey County had about 10,900 more people leave than arrive.

Overall, Hennepin County's population loss is about half a percentage point year over year. Ramsey County lost 1% of its population. Overall, Minnesota's population grew less than 1%.

By contrast, the other five counties in the metro area all gained population. Many of the gains were small and were almost entirely due to natural increase (more births than deaths). In fact, Washington and Carver counties were the only ones in the seven-county metro to have net positive domestic migration. Dakota County had 2,000 more people leave than moved in. Anoka County had 500 more people leave than became residents.

Real estate agent Kris Lindahl said he's seeing the population shift firsthand. More of the homebuyers he works with not only want the flexibility of working from home, they want the freedom of living and working in outlying areas that offer more plentiful land and less expensive housing.

"Work from home, work from the office, how that's going to shake out is still to be seen. More flexibility is what we're hearing from all the clients we're working with," Lindahl said. "The commute isn't as much of a priority because it's not something people are doing every day."

Cass County had the biggest overall population growth, a 2% increase between 2021 and 2022. That was entirely due to domestic migration. The county gained 737 more people than it lost due to migration.

Wright County, just northwest of Hennepin County, also grew by about 2% thanks to increases across the board — more births than deaths, more people moving in than leaving. The county has had positive net migration since 2014.

Isanti County also grew by about 2%, almost entirely due to migration. Deaths slightly outnumbered births.

In all, 53 of Minnesota's 87 counties had more deaths than births between 2021 and 2022. That's up from 51 counties the year before and 24 just before the pandemic.

In Hennepin and Ramsey counties, officials said the population losses are troubling.

In a statement, Hennepin County Board Chair Irene Fernando said paying attention to population shifts is important.

"I am proud of Hennepin's leadership in 2020 because we sought to count every single person in our communities. The Census every ten years is the most inclusive civic duty we have, and we take seriously the mandate to count each resident — with particular attention to our neighbors that the Census Bureau categorizes as 'historically undercounted' populations, such as children, students, households with multiple languages, snowbirds, and people experiencing homelessness," she said. "While the recent year-over-year shows a decline, this data also shows that Hennepin must continue to invest in our communities to retain and attract residents, so we grow in the long-term."

Population growth is important, said Jolie Wood, Ramsey County's acting director of Policy and Planning, because it's "where economic activity comes from, where economic vitality comes from."

The 1% population loss in Ramsey County was among the largest in the state. Cottonwood and Kittson both lost 2% of their populations year over year.

Ramsey County's declines over the past two years are a sobering change from the growth recorded in the 2020 Census, Wood said. That census saw Ramsey County's population growth at its highest point since the early 1960s.

"This is a fairly sudden reversal of that," she said, adding that the county's international migration numbers and natural population numbers are still growing.

Until employers and workers figure out what makes the most sense in terms of where to work, Wood said, the situation will likely remain fluid.

"We're going to see ripple effects from the pandemic for quite some time," she said.