Ending an 18-month lobbying battle between landlords and child safety advocates, City Council on Thursday voted 16-0 to approve a bill aimed at ensuring children aren’t exposed to lead in rental housing.

“Our children continue to be poisoned by lead even though we have the tools available to create a safer and healthier environment,” Councilwoman Blondell Reynolds Brown, who wrote the legislation, said before the vote.

Paint that contains lead, which can cause developmental problems for young children, was banned in the United States in 1978, but buildings constructed before then can still expose children to lead if newer layers of paint deteriorate.

Brown’s bill, which will require landlords to test all rental housing for lead every four years, fixes enforcement problems with a law Council passed in 2011 that only required testing for units with families who had children 6 years old or younger. The new bill, which Mayor Jim Kenney supports, goes into effect in October 2020.

Sherrie Cohen, a lawyer who has represented tenants, told Council that landlords often get the benefit of the doubt in court cases involving the 2011 law.

“Landlords would claim in court that they did not know that the family had young children … even when parents testified that when they signed the rental lease they had a baby on their lap,” said Cohen, who is running for City Council as an independent. “Too often judges would find the landlords more credible.”

Landlords contend that the cost of testing all rental housing for lead every four years — which Brown said costs about $70 to $150 — will make it more difficult for them to offer affordable housing.

Councilman David Oh voted for the bill but said he understood the landlords’ concerns.

“We want safer environments, but in reality there are a lot of people who can’t afford to make those changes,” he said. “It does affect the affordable housing.”