A Massachusetts mother who was arrested after she allegedly stabbed her two sons to death with a kitchen knife told police that she attacked them as part of a voodoo ritual, an official said Tuesday.

Latarsha L. Sanders, 43, claimed she first stabbed her eldest son Edson "Marlon" Brito, 8, during the ritual but "it came out 'wrong,'" assistant Plymouth District Attorney Jessica Kenny said during an arraignment hearing, according to the Boston Herald. Sanders then reportedly went after her 5-year-old son, Larson Brito.

"She said she had stabbed him because she had 'failed' in the ritual with Marlon (Edson)," Kenny said. "She responded to police that she felt bad about what she had done."

An early autopsy report showed the 8-year-old was stabbed 50 times, Kenny said, according to the Herald. She added that Sanders admitted to the killings.

The suspect also reportedly told authorities the type of weapon she used, that she "mopped up the blood" and that she "cleaned up both of the children and placed them in separate beds," Kenny said.

Sanders pleaded not guilty after being charged with two counts of murder. She was ordered held without bail.

Police arrived at the mother’s Brockton home Monday afternoon after a neighbor called 911 to report a medical emergency. The boys were found dead with multiple stab wounds.

“All crime scenes are grisly. But these victims were innocent children. This was a gruesome and disturbing and, most of all, a heartbreaking crime,” Plymouth District Attorney Timothy J. Cruz told reporters on Monday, according to the Boston Herald.

NEW YORK NANNY ACCUSED OF STABBING KIDS TO DEATH FACES LIFE SENTENCE AS TRIAL BEGINS

The mother was arrested after police said she gave “statements that can be construed as admission on this crime.” Police believe the fatal stabbing took place within the last 48 hours. The boys were last seen on Saturday by their grandmother, prosecutors said.

Vin Lalli, a neighbor, told the Boston Herald that she saw Sanders sitting down and telling another resident to call the ambulance Monday afternoon.

“The ambulance driver put her on the stretcher and all of a sudden she started screaming and kicking around,” Lalli recalled. “And a woman [also living in the building] came out and said, ‘I think she killed her babies.’”

JURORS TO HEAR DETAILS ON VIRGINIA GIRL'S 2016 KILLING

Lalli said Sanders was “kind of hysterical” and believed the mother “snapped or something.”

Another resident Sherri Alaboh also told Boston25: “You never know what people are going through. Maybe she needed help and didn’t know where to turn, or just gave up.”

The Associated Press contributed to this report.