The Supreme Court ruled Monday that local governments can compel private trash haulers to use municipal facilities, even if it would cost more to keep garbage at home than to dispose of it elsewhere.

The ruling upholding local ordinances in upstate New York protects a stream of money that allows the counties, like other governments that have built recycling centers and landfills, to help pay off millions of dollars in debt they incurred to establish such facilities.