As the United States debates the right levels of immigration — and whether, as President Trump suggested, there is room for much more of it — new census data shows that international migration is keeping population growth above water in much of the country.

Although international migration dropped in 2017 and 2018, it accounted for nearly half of overall American population growth in 2018 as birthrates declined and death rates rose.

International migration helped rural counties record their second straight year of growth, according to local population estimates for 2018 that the Census Bureau released on Thursday. And immigrants bolstered urban counties that have been losing residents to more affordable areas. Even so, the three largest metro areas in America — New York, Los Angeles and Chicago — all shrank slightly.

Without these international moves, 44 percent of the nation’s population would be in shrinking counties, instead of the current 27 percent. Dense urban counties and sparse rural areas, despite typically being on opposite sides of the political spectrum, share economic concerns related to population decline.