JEFFERSON CITY, Mo. (AP) — The Missouri Senate has passed legislation that could prohibit neighbors from filing nuisance lawsuits against farms or businesses that abide by the terms of government permits.

The bill won approval Thursday by a 24-10 vote, despite concerns by some lawmakers that it could bar property owners from going to court over the powerful odors from large hog farms.

Sponsoring Senator Brian Munzlinger said he believes such nuisance lawsuits would still be allowed, because Missouri’s environmental permits for large livestock farms cover water discharge — not air emissions. But the Republican senator from Williamstown says a state permit should be like a warranty that shields holders from lawsuits as long as they’re abiding by its terms.

The legislation now moves to the House.