A 24-year-old Brooklyn Park man on Friday pleaded guilty to second-degree intentional murder in the death of his 23-month-old son.

Reggie Delaine Harper had been in the Hennepin County jail awaiting a Jan. 25 trial in the Dec. 9, 2014, beating death of Kazerion Harper. The plea deal he accepted Friday means he will spend a maximum of 40 years in prison, according to County Attorney Mike Freeman. In exchange, a first-degree murder charge was dropped.

The baby’s mother and grandmother both gave emotional victim impact statements at Friday’s hearing.

According to the charges, Harper assaulted Kazerion because he was crying. He would not allow the baby’s mother to tend to him. Instead, he punched him repeatedly and threatened to hurt his mother if she interfered.

By the time paramedics arrived, Harper had fled, the charges said. Kazerion was pronounced dead at the hospital. An autopsy showed that he had three broken ribs, a tear in his right lung and a separated liver.

According to county child protection records, Reggie Harper had been reported at least three times for abusing his children. Kazerion had been placed in foster care in 2013, then reunited with his mother in March 2014.

Harper admitted to the aggravating circumstances in the crime, which allowed the judge to raise his prison sentence from state guidelines’ 306 months to the 480-month sentence he received, the maximum allowed under law.

Those aggravating circumstances were that Harper was the boy’s father, that the victim was an infant, the cruel manner in which he was killed and that it happened in the boy’s home, which should have been a safe zone, the county attorney’s office said.