The Portland City Council’s Public Safety Committee held a five-hour public hearing Thursday, eventually reaching a unanimous recommendation to deny Occupy Maine a permit for a six-month encampment at Lincoln Park.

That sounds final, but we hope the talking is not over. There is too much at stake for both sides to resort to the kind of confrontation and violence that have marred protests in other cities.

The full City Council will consider the request Wednesday, and we hope that the cool heads on both sides can reach a resolution.

The Occupy Maine protesters argue — in our view, rightly — that what they are doing is free speech, protected by the First Amendment to the Constitution. But that is not enough to end the argument.

No right is absolute, and we live with legal restrictions on constitutional rights all the time, from the prohibition on gun ownership for felons to limits on the size of public gatherings.

The city has an obligation to protect the safety of its residents, and the presence of a large number of people camping in Lincoln Park has resulted in a number of dangerous situations, including assaults, in what had been a largely crime-free corner of the city.

The Occupy Maine group wants the authority to govern and police itself, but it cannot and should not be permitted to try. It is not a city within the city.

Somewhere in the middle, however, common ground could be found if both sides keep working together.

All observers would agree that most of what Occupy Maine is doing does not create a public safety hazard. No one would argue that assaults, fire hazards and sanitation problems are part of their message.

Both sides should cool down their rhetoric and focus on what can be done to preserve the rights of the Occupiers to protest, without getting in the way of the city’s duty to protect public safety.

So far, city officials and police have been a model of restraint, and the Occupy Maine group has shown a willingness to work with authorities. That should not be lost in an exchange of overheated rhetoric.

Anyone looking for a quick and decisive resolution to this situation is going to be disappointed. The best that both sides can do now is keep talking.