Residents of Brookline have voted to bar eating establishments in town from using Styrofoam beverage cups and takeout food containers.

Town Meeting in the Boston suburb on Tuesday voted 169-27 to bar the use of polystyrene foam, commonly known by the brand name Styrofoam, by December 2013.

Supporters say the ban will cut down on trash and keep the foam products, which take years to break down, out of landfills.

"What we're doing is protecting our environment from the use of this product which does not biodegrade," Town Meeting member Nancy Heller said. "It will be here long after we're gone."

Opponents called it government overreach and said people who don't want to use polystyrene containers can simply visit establishments that don't serve food and drinks in them.

Several other communities nationwide have barred the use of polystyrene, including Great Barrington. Amherst is also considering a ban.

With reporting by The Associated Press and the WBUR Newsroom