The pressure of providing emergency services to people who are homeless is reviving arguments in Portland about whether the city is too welcoming to people in need.

As that discussion moves forward, no one should lose sight of one point: Portland didn’t create this problem, and Portland can’t make it go away. Homelessness is caused by multiple forces, almost none of which originate inside the city’s borders.

The kind of shelter Portland operates, or whether it operates a shelter at all, is not going to change the social conditions that drive people out in the cold. It will take changes to housing and social service policies on the state and national levels to make a difference, and everyone who lives or does business in Portland should be pushing for more robust anti-poverty programs from Augusta and Washington to make that happen.

Homelessness is not one problem, but many, and not everyone who is affected can be seen queueing for a mat on Oxford Street, or camping in a strip of woods on the city’s edge.

The most important and overlooked cause of homelessness is a lack of affordable housing. More than a third of people in southern Maine pay more than 30 percent of their income on rent. That makes thousands of people a car repair or medical bill away from eviction. They don’t all end on the street, but they may if they don’t have family or friends with a spare room or a couch they can use. A shortage of affordable housing in the economic hub of the state is a recipe for homelessness.

Portland’s shelter policy also is not responsible for untreated mental illness and substance use disorder, which, when combined with economic factors, can make people homeless and keep them that way for a long time. Like many states, the biggest providers of mental health services in Maine are the jails and prisons. When inmates are released, it’s not unusual that their first address is Portland’s homeless shelter.

“We have defaulted our mental health system to law enforcement,” state Sen. Cathy Breen, D-Falmouth, said recently. “What we have now isn’t treatment, it’s crisis management.”

Breen introduced a bill this year to create a working group that would develop a better care strategy. Until that happens, places like the Portland shelter will be feeling the strain.

There are other categories of people experiencing homelessness that require their specific approaches. Homeless families, teens, veterans, senior citizens and asylum seekers all need different kinds of help. And none of their problems are driven by the availability of shelter space in Portland.

Still, some city residents seem to think that there is an easy way out, and that all Portland needs to do is shut its doors to nonresidents and the problem would go away.

But that’s wishful thinking. Until we are willing to ask why people are homeless and do something to address the causes at their root, this is a problem that will only get worse.