PHILADELPHIA (CBS) — Snacking on peanuts could help prevent obesity, researchers say.

Scientists found people who snack on peanuts and peanut butter have a lower body mass index.

READ MORE: WATCH LIVE: Pennsylvania Gov. Tom Wolf To Announce Funding For Gun Violence Prevention

A study followed middle school students who swapped out unhealthy snacks for peanuts, and after 12 weeks the students who ate the peanuts had a lower body mass index than those who did not.

READ MORE: Bobby Henon Resigns From Philadelphia City Council 2 Months After Bribery Conviction

The students continued to lower their BMI for 12 weeks after the study.

Additionally, after six months, researchers found those who snacked on peanuts or peanut butter experienced a significantly greater decrease in body mass index compared to those who did not have the peanut snack.

MORE NEWS: WATCH LIVE: Governor Tom Wolf To Highlight Pennsylvania’s Fiscal Strength And Bright Future

Researchers found peanuts are a healthy alternative for children who frequently snack on “energy dense, unhealthy snacks.”