The days of Chicago taxpayers footing the bill for free garbage collection to nearly 1,200 nonprofits are finally drawing to a close.

Under pressure from Inspector General Joe Ferguson, Streets and Sanitation Commissioner John Tully has agreed to stop the freebie. He will continue garbage pickups only to those nonprofit organizations that “meet financial criteria to be codified” by Dec. 31 — and those groups will pay $9.50 a month.

The crackdown will include “additional eligibility standards limiting the number of refuse carts available to nonprofit entities to better align with [Streets and Sanitation’s] residential model,” Tully wrote to Ferguson in a letter dated Aug. 16.

“All nonprofits that receive services will be billed monthly upon implementation of this policy,” the commissioner wrote.

Tully also agreed with Ferguson that the city’s current list of “at least 1,182” nonprofits that get free pick-ups does not include all organizations receiving the services.

As a result, Streets and San will “continue to review its cart inventory to ensure accuracy of service delivery, reporting and billing,” the commissioner wrote.

Ferguson welcomed the Lightfoot administration’s “renewed commitment to ensuring, not only that the law is properly followed, but that the law is equitable and fair to those affected by it.”

“When departments choose not to comply with the municipal code ... it often means forfeited taxpayer dollars, inefficiencies and inequities,” Ferguson was quoted as saying in a press release.

“We are therefore pleased that the new administration is acting to amend the code to ensure that the law is reasonable, effective and fair to every constituent.”

The decision to trash the perks was four years in the making.

That’s how long ago Ferguson first sounded the alarm that Chicago taxpayers were footing the bill for an illegal freebie to 1,393 nonprofit properties, at an annual cost of $3.3 million, even though the City Council never authorized the perk.

Then-Mayor Rahm Emanuel vowed to end the freebie, but didn’t. Confronted about the broken promise, Emanuel said he was too busy making even bigger changes to garbage collection.

Shortly before Mayor Lori Lightfoot took office, Ferguson tried again to force the city’s third-largest department to make changes.

This time, his advisory accused Streets and San of illegally providing free garbage collection to “at least 1,182 nonprofit entities,” even though the municipal code “requires all recipients of city garbage collection service to pay $9.50-per-month.”

The list includes 911 religious entities; 94 private schools; 45 recreational or community centers; 28 government offices; 23 day care centers; 17 shelters; 12 medical/rehab centers and 4 other schools.

“The city is losing at least $134,748 in garbage fees each year, totaling $449,160 in the 40 months” since the garbage collection fee was imposed, Ferguson wrote.

The inspector general further concluded the freebie was “inherently unfair” because it was “only available to those nonprofits fortunate enough to have received it in the past.”

The system “perpetuates a discretionary benefit” historically granted “to entities who knew to request it or otherwise acquired it, while similarly-situated nonprofits are denied this benefit and must pay for private garbage collection,” Ferguson wrote.