Even with his murderous stepfather sentenced to 25 years to life in prison, there was no explanation Thursday for the brutal death of 10-year-old Abdifatah Mohamud.

“Sometimes, people look to a judge to make sense of things. That cannot be done here,” State Supreme Court Justice Christopher J. Burns said as he sentenced Ali-Mohamed Mohamud, a 41-year-old security guard, to the maximum term for second-degree murder.

Erie County District Attorney Frank A. Sedita III called Mohamud’s killing of his stepson “one of the worst cases” he has seen in his 24 years as a prosecutor.

The details of how the fifth-grader from International Preparatory School was stabbed, suffocated and beaten to death April 17 shocked the community.

Prosecutors described how Mohamud duct-taped a sock in the boy’s mouth and bound his hands with electrical cord and then struck Abdi nearly 70 times with a baker’s hardwood rolling pin.

Jurors last month convicted Mohamud after hearing prosecutor Thomas M. Finnerty describe how Mohamud inflicted “devastating blow after devastating blow” on the 4-foot, 11-inch boy, who weighed just less than 100 pounds, separating the boy’s skull from his spinal cord and crushing the back of his head, exposing his brain.

The fatal sequence of events started when the boy resisted studying and tried to run away from his Guilford Street home. His stepfather took him to the basement, and when the boy kept screaming, he taped a sock in Abdi’s mouth.

And when the boy kept trying to run, Mohamud bound him with electrical cord.

And after the boy kicked Mohamud in the groin, there was more beating.

“I started hitting him again with the stick,” Mohamud said in his police statement.

During his trial, Mohamud’s defense lawyers argued that he did not intend to kill the boy but lost control after he became enraged at the child.

“I suspect there never has been a parent who hasn’t been frustrated by or angry at their child at one time or another. But anger and frustration doesn’t explain this,” Burns told Mohamud during the seven-minute hearing. “This was rage. And you did not lose your son, you sacrificed your son to your rage.”

“Early on, you should have been sickened by your actions, but you weren’t,” Burns added. “There really isn’t an adequate explanation for all of this.”

Sedita also was at a loss to explain why the crime occurred.

“It’s curious that the more aberrant somebody’s conduct is, the more the case cries out for an explanation,” Sedita said after the sentencing. “Sometimes, and I think this case is an example, there is no explanation other than the simple recognition that there are those among us who are evil.”

Mohamud spoke for several minutes and sought forgiveness at his sentencing.

“If only I knew what I was doing that fateful day,” Mohamud said. “I never meant to do that.”

“I understand your hatred to me,” he said, referring to Shukri Bile, his wife and the boy’s mother. “I took away a son I loved so much.”

Now, he said in court, he feels “an emptiness that will never go away.”

Born in Somalia, Mohamud has lived in the United States for more than a decade. He met Abdi and the boy’s mother just two weeks after she and her children arrived in the United States in 2004. Mohamud and Bile later married.

At times Thursday, he spoke softly and could be barely be heard. At other times, his accent made him difficult to understand.

At one point, he said of his stepson, “I wanted him to achieve the best educational [outcome], and I wanted him to get the opportunity I never had in life.”

“I’m asking for your forgiveness,” he said.

He did not receive absolution from his wife.

“It’s too late for him,” Bile said. “He has already killed my child. A long time ago, he should have pleaded to his guilt.”

Hussein Waris, a stepbrother who was with the police officer who discovered Abdi’s lifeless body in the basement, said Mohamud’s remorse was just an act.

“He’s a psychopath,” Waris said of Mohamud. “He’s a liar. What he’s saying is not what he meant.”

Family members did not make a victim-impact statement during the hearing but asked Finnerty to speak on their behalf.

Finnerty, who with Assistant District Attorney John Feroleto prosecuted Mohamud, asked for the maximum sentence.

“I suspect this was one of, if not the most heinous murder trial that you may have presided over during your career,” Finnerty told the judge.

“The proof of the defendant’s guilt was so overwhelming, the defendant’s conduct so cruel, so violent, so depraved in taking away the life of an utterly innocent and defenseless 10-year-old boy, that the maximum sentence of 25 years to life is the right sentence,” Finnerty said in court. “It is the appropriate sentence. It is the only just sentence in this case.”

Defense lawyer Kevin Spitler said Mohamud’s is remorseful over his stepson’s death. “It was never his intention to cause his son’s death,” Spitler said. It “has clearly devastated his family’s life, his life and the life of the community on so many levels. It is one of the saddest matters that I have personally been involved in.”

Tears swelled in Bile’s eyes outside the courtroom after the sentencing

She spoke of the betrayal and horror she felt when she came home from her custodial job and discovered that her son had “just been killed by someone you loved and cared about.”

“It’s not something that I will ever forget,” said Bile in Somali, as her son translated.