Long-term costs for both active and closed landfills cost local governments in New York nearly $300 million, according to a report released Thursday by Comptroller Tom DiNapoli.

“Owning a landfill can generate significant revenues, but also carries a significant long-term price tag,” said DiNapoli. “Before landfills begin to reach capacity, it is critical that local governments plan for future costs that will be paid long after the revenue stream has ended.”

Outside of New York City, local governments spent even more on garbage and refuse-related needs, totaling $917 million.

But local landfills can be especially burdensome for local governments and public authorities that operate them. Eighty local governments have closure liabilities of $298 million they must pay over a 30-year period.

Some communities have relatively small post-closure costs, like Arietta in Hamilton County, which must pay $23,000. Other communities, however, like Brookhaven in Suffolk County have $34 million in landfill liabilities.

Local governments do have assistance in the form of grants from a DEC program, but it is funded at only $250,000 a year and has a long wait list, DiNapoli’s review found.