A playground at St. Mary School was upgraded thanks to a $30,000 grant from the Dannon company.

St. Mary won the 2012 Dannon Danimals Rally for Relay contest, thanks to a number of parents who collected and compiled contest codes, according to school spokesperson Amani Zabski.

Five schools from across the country were awarded $30,000 playground makeovers in the contest, which encourages physical activity in school, Zabski said.

Each school collected codes from specially marked Dannon products and redeemed them online, with the highest number collected in each league winning the prize.

“St. Mary School in Milford rallied together by hosting drives and events to make our goal of winning possible,” Zabski said. “The school worked hard collecting and sending in codes, as well as writing out index cards, stuffing and stamping envelopes to mail in requesting extra codes.”

For the past several months, a committee was busy researching various ways to effectively use the money awarded by Dannon.

Using input from a number of sources, including the students, teachers and contractors, a plan for an improved play area was created and additions to the playground were installed, school officials said.

Included in the upgrade is the addition of safety surfacing under the new state-of-the-art play equipment as well as some of the older equipment.