PHILADELPHIA (AP) - An open-air heroin market that has thrived for decades along a set of train tracks a few miles outside the heart of Philadelphia may soon be cleared out after city and railroad officials announced an agreement Thursday to clean up the trash-filled gorge.

After more than seven months of debate, Mayor Jim Kenney and Conrail have set terms to start removing syringes, drug users and homeless people from the half-mile stretch of train tracks, commonly known as El Campamento, running through the Kensington and Fairhill neighborhoods as soon as possible.

U.S. Rep. Robert Brady, who was credited for brokering a deal between the city and the rail company, used stronger language.

“I am pleased today that an agreement was reached that will end what really has been a drug hell that has lasted too long in a city neighborhood,” he said.

Conrail will remove needles, debris and vegetation along the train tracks. They will also repair fencing, increase police patrols and dump broken pieces of concrete under certain bridges to make them less desirable for homeless people.

The city will be responsible for hauling off the waste and will provide barriers to deter illegal dumping on the property.

The encampment can serve as a home to dozens of people at any given time, with many more visiting the site daily to buy and shoot up heroin. City officials said health care workers will accompany Philadelphia and Conrail police officers as they clear people from the property and offer them housing or drug-addiction services. The city has also earmarked an additional $250,000 for supportive housing in the area in its most recent budget.

“While Conrail works to clean, secure and maintain its property, we are going to be focused on helping the individuals who frequent the area along those tracks get into treatment and supportive housing,” city managing director Mike DiBerardinis said.

Officials were careful to note the long road ahead in breaking up El Campamento.

“We’re not having a celebration today,” Kenney said. “We are beginning the process of making the community whole and trying to get people back on track.”

The agreement comes amid local and national booms in opioid-related deaths. The Philadelphia health department says 907 people fatally overdosed in city last year, with opioids being responsible in more than 80 percent of cases.