SALEM, Mass. (AP) -- Two teenage girls face charges after Massachusetts police say they put an infant they were baby-sitting inside a refrigerator and closed the door.

The girls were released to their parents after their arraignments Tuesday in juvenile court on charges of child endangerment and assault and battery with a dangerous weapon. Their names were not made public because of their ages.

Police became aware of the Monday night incident after a social media video surfaced of the girls putting the baby girl in the refrigerator, closing the door and laughing. They removed the baby unharmed within a few seconds. 

The baby's mother says she asked her niece and a friend to watch the 7-month-old baby, so she could take a shower.  She says the baby is fine. And she admits she's angry but does not think the girls meant any harm. "Kids do stupid things. She didn't - I know she wouldn't hurt my daughter and that wasn't her intentions. I think it was all foolishness, stupidity," she said. 

But police thought it was criminal. Danvers Police arrested and charged the girls the next day. 

Copyright 2017 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.