A woman in South Africa was taken into custody Sunday for beating her 11-month-old infant to death.

The 42-year-old unidentified woman began beating the infant after locking herself and the child in a hut in Halambani Tswinganani village on Sunday morning. Neighbors, who heard the baby's cries, rushed to the house, and broke opened the door to find the infant with serious injuries. The baby was rushed to a nearby hospital where he was declared dead on arrival, News 24 reported.

"It is alleged a 42-year-old woman locked herself and her 11-month-old baby inside a hut and started beating him. Local community members reportedly heard the frantic cries of the baby and rushed to the house," police spokesperson Brig Motlafela Mojapelo said, Times Live reported.

"After realizing the door was locked, they broke it open and rescued the badly injured baby from his mother. The baby was rushed to the local Lambani Clinic but was unfortunately declared deceased on arrival," Mojapelo added.

The woman was taken into custody Sunday evening. The police were questioning her to find out why she brutally beat the infant. The woman will appear in court later this week when she will be charged.

Meanwhile, the police said the community members had threatened to take action against the woman.

"We strongly warn community members in that part of our province to desist from taking the law into their own hands as this would make them criminally liable. They must instead give police space to legally deal with this gruesome incident," Police commissioner Lt-Gen Thembi Hadebe said.

Last month, a teen mother in the Philippines was arrested for beating her toddler to death allegedly because she was mad at the child’s father. The 18-year-old woman started beating the toddler with a wooden stick at their home. When the toddler experienced difficulty in breathing, she took the child to a local hospital, where she was pronounced dead on arrival. An autopsy revealed the child died from blunt abdominal trauma and had blood clots all over her body. The mother was charged with murder.

baby feet
This image shows the feet of a baby at a hospital in London, on March 20, 2007. Christopher Furlong/Getty Images