PORTLAND, Maine—This community has long offered a generous hand to immigrants.

But Maine’s largest city, population about 67,000, is now struggling with an influx of asylum seekers, to the point where a local official is alerting shelters in other parts of the country to discourage people from heading here.

“The word is out there that our community is open to that population and has some assistance programs,” said David MacLean, administrator of Portland’s Social Services Division. “Our local resources are not able to keep up.”

Asylum seekers, who are primarily from African countries, now make up 90% of the people living in Portland’s city-run family shelter and overflow shelter, where new arrivals sleep on mats. A city fund that assists with necessities is dwindling fast, and pro-bono lawyers are overwhelmed with cases, Mr. MacLean said.

Portland’s strain comes as the number of asylum requests, in which people ask to be allowed to stay in the U.S. for humanitarian reasons, has ballooned. That is contributing to the well-publicized bottleneck at the Southwest border and the political clash over it.