Mike Levy went to City Hall recently to testify in support of legislation aimed at tackling Philadelphia’s rampant bedbug problem.

Levy, a University of Pennsylvania epidemiologist, and other advocates expected a good outcome that day in October. Philadelphia has the highest infestation rate in the country, according to one survey, and it’s the only big city without rules meant to stop the spread of bedbugs. There was little public opposition to the bill, and enough City Council members were on board that eventual passage seemed like a sure thing.

But Councilman Mark Squilla, who wrote the bill with the help of Levy and other experts, shocked proponents of the measure by making a series of last-minute changes pushed by lobbyists for the city’s landlords. Levy said Squilla effectively gutted the bill.

“The landlord lobbyists were in the hallway when this happened. It’s not like they’re hiding who is writing" the amendments, Levy recalled. "They made no public statements whatsoever, but there they were in the hallway. So they definitely have Council’s ears in a way that those of us who are called to testify do not.”

It’s a common scene in City Hall. Three times this fall, Council committees changed bills supported by health advocates or environmentalists through last-minute amendments favored by lobbyists for moneyed interests.

Quietly slipping industry-favored provisions into legislation is a technique employed by corporate lobbyists across the country and at all levels of government. But the recent moves in Philadelphia frustrated advocates because their initial backing of the bills helped build support for them by providing an aura of reform.

For Levy, who worked with Squilla’s office on the proposal for three years but was otherwise unfamiliar with the machinations of City Hall, the experience left him wondering whether the industry-friendly amendments were part of the plan all along.

“My initial feeling was that we may have been set up and asked in good faith to write legislation that was then hijacked by the lobbyists, the special interests,” Levy said.

Squilla said that while he already had the votes to advance the bill out of committee before proposing the amendments, his goal was to balance the interests of both sides.

“How do we get the most people to support a bill, but also understanding that the end goal of the bill was ... that Philadelphia isn’t known as the No. 1 capital of the world of bedbugs,” said Squilla, who may again amend the bill once it reaches the full Council. “It’s a long process. It’s a tedious process. If at the end of the day both sides go away a little mad, then you’ve probably had a good bill.”

Another recent bill changed at the last minute thanks to landlord lobbyists centered on protecting children from lead paint in rental properties — also a problem that’s more widespread in Philadelphia than in many other big cities.

Councilwoman Blondell Reynolds Brown’s original legislation required landlords to conduct lead inspections in units built before 1978 every two years. In committee, she amended that to every four years.

“My responsibility is to listen to all sides all the time and to figure out the and, A-N-D, not the or," Brown said. "That’s not me. I’m not a win-lose kind of gal. I’m always looking for a win-win.”

The bill passed with support from groups like Community Legal Services, which advocates for low-income tenants and families.

And Squilla’s proposal to ban single-use plastic bags in the city and levy a fee on paper and thicker plastic bags also saw a big change in committee. Squilla stripped out the fee, a move that environmentalists who pushed the original bill say could actually increase plastic waste by allowing stores to offer thicker bags for free while the thinner ones are banned.

In that case, Squilla said, he reluctantly proposed the amendment to ensure the bill won committee approval, not because he was listening to lobbyists. He plans to attempt to amend the bill again next week to find a compromise by banning regular plastic bags immediately but delaying the fee for one year. During that year, the city would measure whether bag use has decreased, and if not, the fee would be imposed.

“We have some of the environmentalists who were supportive the whole time who don’t like what we had to do to massage the bill to get it out" of committee, Squilla said. "But the goal was to get something out and then once we get it out, if it’s not perfect, we can then work on it in the following years to see what unintended consequences there were.”

In the case of the bedbug bill, the most significant change split the cost of addressing infestations between landlords and tenants. All other bedbug ordinances in large U.S. cities require landlords to pay for that, according to Community Legal Services. Advocates feared the change would cause low-income renters to forgo reporting infestations to avoid potentially paying thousands of dollars to deal with them.

Victor Pinckney Sr., a vice president for the Philadelphia landlords association HAPCO, said Squilla accepted the changes because landlords presented him with new facts about the issue, which Pinckney said he has been studying intensely in recent years.

“Things were pointed out that maybe were not shown in their original rush to get that passed," Pinckney said. “My board used to laugh at me because I know more about bedbugs’ sex life than things I should know."

But his research hasn’t always aligned with that of scientists like Levy. For instance, Pinckney said bedbug infestations that are already in an apartment when tenants move in should be easily detected because the insects are attracted to the carbon dioxide humans exhale — which he said means the bugs will present themselves quickly. Levy, who has published multiple scientific articles on bedbugs, testified that it can take six months or more for infestations to be noticed, especially if tenants move in during the winter.

That fact is key to when, if ever, tenants should be financially responsible for remediation costs. Squilla’s bill requires landlords to pay in full only if the infestation is discovered within the first 90 days of a lease — the logic being that tenants must have caused the infestation if it was discovered later.

Pinckney said that if scientists like Levy disagree with him about bedbug infestations, they must be withholding information. He declined to say why. In the end, Pinckney said, the landlords were able to win Squilla’s support for the changes because they were willing to compromise.

“Do you think we’re happy with that bill they presented that the other side wasn’t happy with?" he said. "No, we weren’t happy with it, either, but we are willing to accept compromise.

"Compromise is not in their vocabulary,” Pinckney said of advocates for the original bill.

Levy said passing weak legislation that looks as if it is backed by experts could be counterproductive if it lets City Council declare victory on the issue without going further.

“It’s worse than nothing,” he said.