A New York man convicted of killing a mother and her four children with a meat cleaver was sentenced on Tuesday to serve 125 years to life in prison, prosecutors said.

Mingdong Chen, 27, pleaded guilty on Oct. 7 to three counts of second-degree murder and two counts of first-degree manslaughter in the slaying of the family, with whom he was distantly related, while he stayed at their home in Brooklyn. 

RELATED: Bushwick handyman gets life sentence for killing, dismembering landlord boss

"This defendant's vicious and sadistic attack makes him completely unfit to remain in society and he will now spend the rest of his life behind bars," Brooklyn District Attorney Ken Thompson said in a statement.

"While we will never know what drove him to commit these murders, I hope that this sentence will offer this grieving family some measure of comfort," he said. 

An attorney for Chen declined to comment on his sentencing.

Chen, who was a cousin of the slain woman's husband, had been living with the family for two weeks when the attack occurred, prosecutors said. 

RELATED: Armed man forces himself into Brooklyn MTA token booth

According to investigators, the mother, Qiao Zhen Li, placed a call to a relative in China on Oct. 27, 2013, to say Chen was threatening her and her children, who were heard crying in the background. The relative alerted police. 

Once police arrived at the apartment, they found Chen covered in blood, prosecutors said. Li, 37, and her children Linda Zhuo, 9; Amy Zhuo, 7; Kevin Zhuo, 5; and William Zhuo, 1, were pronounced dead at the scene.   

Police say Chen admitted to the killings during initial questioning.