A Greenfield man was sentenced to 37 years to life in prison on Wednesday for murdering his girlfriend's baby.

Diego Burgos, 21, was convicted in September of murdering Aracely Mares' 10-month-old son, Camilo Miramontes. Burgos was also convicted of assaulting a child resulting in death, felony child endangerment and felony child abuse.

Judge Russell Scott handed down the maximum sentence, saying Burgos tortured the boy for weeks.

Burgos was 19 years old and living with Mares when Camilo died six days after receiving blunt-force trauma injuries.

The baby's death followed what doctors said appeared to be weeks of ongoing abuse that included broken legs.

In testimony during the three-week trial, Burgos denied hurting the boy. Defense attorney Miguel Hernandez cast suspicion on the child's mother, Mares, who has since lost custody of her other son, according to statements made during the trial.

Mares testified Burgos blamed Camilo for the miscarriage of the couple's child in 2011.

Prosecutor Rolando Mazariegos acknowledged during the trial that Mares was a negligent "enabler" in the boy's death, but said Burgos "hated Camilo."

Mares faces felony child endangerment charges and is scheduled to appear in court on Jan. 30.

The case relied heavily on the testimony of Mares, who admitted lying to police and often appeared confused and unable to recall events on the witness stand.

Although no witnesses apparently saw Burgos injure the child, a satellite dish installer testified he watched Burgos shake Camilo, saying "this baby won't shut up" before throwing him onto a bed.

Two days later, Camilo suffered head injuries that would put him in a children's hospital and on life support until his death on Sept. 5, 2011.

A key element of the case were text messages sent between the couple in which Mares accuses Burgos of hurting her son.

"That was a kick with your ... boots," reads a transcription of one message from Mares to Burgos in which she asks him "about unexplained bruises on my kid."

Burgos denies hurting Camilo in his text response.

"God forgive me if I'm blaming you and it's not you," Mares' text reads. "But if it's not you, who else? You're always with him when that happens."

Mares blamed Burgos when she posted photos of Camilo's injuries on her Facebook page, although she failed to notify authorities that she believed her son was in danger.