A 33-year-old man with a violent past was given the maximum sentence — 40 years — for fatally beating his girlfriend’s 3-year-old son in the family’s east-central Minnesota home.

Dante Sears suffered a skull fracture, irreversible brain damage and other injuries on Aug. 24, 2015, days before his birthday at the hands of Jonathan Loun. Prosecutors say Loun left a note beside Dante’s bloodied body in the Sandstone home. He apologized and said he “snapped.”

With credit for time in jail since his arrest, Loun’s sentence from Pine County District Judge Krista Martin last week calls for him to serve nearly 26 years in prison and the balance of his term on supervised release for pleading guilty to second-degree murder.

When Loun was charged soon after Dante’s death, County Attorney Reese Frederickson said he would seek the maximum punishment, noting the toddler was “treated with particular cruelty.”

Loun was watching Dante and the boy’s 7-year-old brother while their mother was at work. When the mother arrived home a little after 7 a.m., she said she found Dante bleeding and unconscious in his crib. Loun was gone.

The note, left on a wall, read: “He pissed on me and I snapped. I banged his head on the floor. Hes not ok ... I’m done with life all I do is hurt people. ... Thank you for loving me and I’m sorry you loved me.”

At the hospital, doctors discovered that Dante’s skull fracture had gone untreated for more than seven hours. Other bruises and injuries were also detected.

In 2014, Loun was convicted of violating an order of protection requested by his mother, who told authorities that she was “fearful of my son and what he is capable of doing.” Loun also was convicted twice that same year for misdemeanor domestic abuse and once for theft.

In 2006, Loun was charged with malicious punishment of a child and domestic assault, accused of slapping his girlfriend’s 7-year-old son.

Those charges were dismissed in November of that year because Loun was already in prison, serving time for criminal vehicular homicide for running over his 32-year-old roommate who got out of his car after the two men argued east of Hinckley, Minn.