Belleville Mayor Mark Eckert, who signed the ordinance on Tuesday, said that many residents have complained about teenagers ringing their doorbells late on Halloween evening.
"We were hearing more and more about bigger kids knocking on doors after 9 at night, and the people who lived in the homes were scared," Eckert told the St. Louis Post-Dispatch. "The seniors were especially scared. They didn't want to be the recipient of some kind of trick; they didn't want to open their doors late at night, either."
The ordinance sets a curfew for trick-or-treating. Children who are in the ninth-grade or beyond can only trick-or-treat if they are escorting younger siblings.
Parents whose children break the rules can be fined $25.
The ordinance also bans adults who have been convicted of molesting children from entertaining trick-or-treaters. They must turn off their outside lights and keep the candy locked away.