The five candidates running for mayor of Maine’s largest city talked about the homelessness crisis, hate speech and voting rights for non-citizens during a Wednesday debate.

Three current Portland city councilors — Pious Ali, Mark Dion and Andrew Zarro — are running for the job, along with former councilor Justin Costa and newcomer Dylan Pugh.

The Nov. 7 race, which will be decided by ranked-choice voting, is to replace Mayor Kate Snyder, who announced last year she would not seek a second four-year term.

The candidates running to replace her offered differing visions for how to help the city’s homeless population during a debate held at the Portland Public Library in front of about 150 people.

Ali said homelessness is complex, with various contributing factors, from those who hit a temporary rough patch to those with substance use disorder.

He said Portland needs help from the state and federal governments and that those with mental health issues need additional services.

“Just giving them housing may not be the solution they need,” he said. “They need more than that.”

Dion, a former sheriff, said while social work has a place in helping those who are homeless, so does law enforcement. He talked about drug use, theft, defecation and private property damage that has occurred in the encampments.

“People are not taking the offers and the resources and the beds that we present to them,” he said. “Many of those individuals simply will not move on. They will stay as long as possible.”

Zarro said the city needs to offer transitional housing as a way to help those who are currently homeless.

He said the city has state funding available to solve the crisis and that a regional approach is necessary.

“This is not Portland’s problem to solve on its own,” he said. “It has been Portland for too long and we can’t do it on our own.”

Costa said when the new mayor is sworn-in in December, he will need to immediately find a way to help those who are living in tents across the city.

Like Dion, he talked about the effects the encampments have on others in the city, including used needles and physical threats. He suggested standing up temporary shelters to protect people, particularly with the cold winter months approaching.

“It is a point of pride that Portland does not shirk its responsibilities,” he said. “It is a point of pride that we try to deal with this. What is happening right now is in no one’s interest.”

Pugh said to solve other issues facing those who are homeless, they need to first have safe housing.

He said it’s important not to demonize people who are homeless.

“Let’s shine the light on us and how we as a society, how our economic systems have created the conditions that allowed this to proliferate not only in Portland, but all over the place,” he said.

The candidates all took strong stands against the hate speech that has interrupted recent city council meetings in Bangor, Portland and Hallowell. And all said they would adopt a collaborative style in working with the city manager and other staff if they are elected.

But one point of disagreement came when moderator Herb Adams, a former longtime state lawmaker, asked whether those who are non-citizens should be allowed to vote in city elections.

In 2010, Portland voters rejected a ballot measure that would have allowed legal residents who are not citizens to vote in municipal elections.

The council revisited the issue in 2018 and again in 2022.

Dion said “no” to the idea and said “citizenship is a core foundation of this democracy.”

Zarro said he couldn’t give a yes or no answer but would be “open to the conversation.”

Costa too said he would consider it and that it should be up to residents to decide if they want to amend the city charter.

Pugh said he would want to talk to new Mainers about whether it’s “something they are interested in,” saying that it’s important to find ways to empower new Mainers.

Ali said he’s spoken to many immigrants about the issue and that he previously put forward a measure to allow immigrants with green cards to vote.

“It’s been done in different municipalities across the country,” he said. “It does increase the number of immigrants who are running for office.”