Footage of sobbing infant was shared on Snapchat in Danvers, Massachusetts.

Two teens posted clip of baby being shut away inside fridge on Snapchat in DanversReuters/Lucas Jackson

Two teenage girls have been arrested in Danvers, Massachusetts, after they posted a video to Snapchat of them putting an eight-month-old girl inside a fridge.

The pair had been babysitting the infant when they decided to put the baby, who was crying the entire time, into the fridge.

The video was sent to police in Swampscott County who forwarded it to officials in Danvers on Monday 7 August.

The short clip is reported to have shown the girls, laughing and placing the baby onto one of the fridge shelves.

They then say "bye" to the child and shut the door.

Danvers police Chief Patrick Ambrose said: "They were charged with child endangerment and assault and battery with a dangerous weapon,"

The mother, who said she was angry after police showed her the videos, defended the teens, telling WBZ-TV: "They thought it was a joke. I feel like they learned from this lesson and they won't do it again."

"We can report that the child is home with a parent and is doing well," Ambrose said.

The pair appeared in juvenile court in Salem and were released into the custody of their parents.

Police are continuing their investigation along with the Essex County District Attorney's Office and the Department of Children and Families.