Two juvenile girls were arrested after they were accused of putting an 8-month-old baby in a refrigerator and posting video of the incident on Snapchat.

The video led police to the teenage babysitters, and in it they can allegedly be heard laughing while the baby cries.

Danvers police told Boston 25 News that they learned about the disturbing video from neighboring Swampscott police on Monday night. It reportedly shows the distressed 8-month-old baby crying while in the care of the two unidentified teenage girls.

RELATED: Teachers are learning how to defend themselves and their students with guns in this intense program

“They had been alerted to a video posted on Snapchat,” Patrick Ambrose, chief of Danvers police, stated.

“In that video, two young ladies could be seen on the video placing a small child, an infant, into a refrigerator,” Ambrose said.

Police said the teens posted the video to social media. The pair were later arrested by Danvers police.

“They were charged with child endangerment and assault and battery with a dangerous weapon,” Ambrose said.

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

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

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

Watch the 2017 Rare Country Awards