As the encampments of homeless people in addiction in Kensington grew to the hundreds, they quickly became a devastating national symbol of the opioid crisis. Strewn with discarded needles, trash, and detritus, they were a heartbreaking picture of human misery.

The city declared the encampments a “disaster” and began a plan to clear them. That plan generated public debate; on one side, Kensington residents saw the encampments as a nuisance and public safety risk. Public outcry grew, led by Councilwoman Maria Quinones-Sanchez who represents Kensington, fueled by the notion that the people who reside in the encampments were not from Philadelphia.

On the other side, some advocates worried that encampment clearing would harm their inhabitants. One of the biggest risks of overdose death is using substances alone; once all the people were dispersed, there would be fewer people nearby with naxolone, the medication that reverses overdoses. .

Now, according to a study published earlier this month, the city’s efforts have seen success. Researchers from the University of Pennsylvania who evaluated the effort found that almost all of the people who lived in the encampments were still alive and many were connected with treatment or shelter.

The city’s careful planning and implementation of the program, which ultimately cleared four sites, deserves credit. The researchers cited “the heroic dimension to the initiative, in which modest resources were pitted against the daunting programs of homelessness and opioid abuse that were particularly intertwined and concentrated in the Kensington area.”

But ultimately, the massive clearing of encampments was the easy part. The hard part starts now — how do we keep encampments from forming again?

The new study sheds some light on what happened following the clearing, and points out that both sides of the debate were partially wrong.

Contrary to popular opinion, the majority of encampment residents — 65 percent — were Philadelphians. Of the 35 percent not from Philadelphia, the majority had been in the city for more than a year. That’s a reminder that addiction and homelessness are problems that are native to our city and we can’t scapegoat them on an “other” that brought them here.

The advocates who argued that clearing the encampments would be sentencing people to death also were wrong. Researchers were able to engage with 189 encampment residents who were on a by-name list created before the clearing. Only two people of the 189 were deceased by Oct. 15. While there is no benchmark rate of fatal overdose in the encampment for comparison, there was no major city-wide spike in deaths.

The most important takeaway from the study is that clearing encampments is not an easy fix to a much bigger problem. While the city was able to offer short-term resources, there are not enough long-term resources — such as permanent housing — to make a lasting impact that will prevent new encampments.

The encampments in Kensington are a symptom of both the opioid crisis and the lack of social services for those who need them most. Investment in housing and resources is the best way to keep them closed.