A third man sentenced in the brutal beating death of a 49-year-old man in his Portland apartment in 2015 will serve 12½ years in prison for manslaughter, a judge ruled Tuesday.

Abil Teshome, 25, will also serve four years of probation and pay more than $8,000 in restitution under the terms announced by Superior Court Justice Thomas Warren after a two-hour sentencing hearing at the Cumberland County Courthouse.

Teshome, Mohamud Mohamed and Osman Sheikh were all charged in the death of Freddy Akoa, 49, who was punched and kicked for hours in his Cumberland Avenue apartment in August 2015.

No one has offered a firm motive for the beating, which left Akoa with dozens of rib fractures, a lacerated liver and head injuries, but Teshome’s lawyer said Tuesday it may have been instigated by Akoa’s girlfriend’s open displays of “physical affection” with Mohamed.

After all five, including the girlfriend, had spent most of Aug. 10 drinking in a park, they headed to Akoa’s apartment, where the drinking continued. At some point, the three men began beating Akoa, although Sheikh’s role was considered minor. Warren said the evidence suggested that Mohamed started the beating and stayed longer in the apartment than the other two.

“This was an absolutely horrible beating, for no apparent reason,” Assistant Attorney General John Alsop told Warren on Tuesday. “Essentially, he (Akoa) was left for dead.”

When he was questioned by police, Teshome confessed almost immediately, said his attorney, Jon Gail. Teshome also offered to testify against the other two men, although that proved unnecessary after they pleaded guilty. Mohamed is serving a 30-year sentence and Sheikh is serving three years.

Alsop said prosecutors agreed to a lesser sentence for Teshome because he had come forward and admitted guilt first.

On Tuesday, Teshome repeatedly said he accepted responsibility and apologized to Akoa’s family for the death.

“I know these are (just) words, but they are very sincere,” Teshome said, turning to look at Akoa’s brother in the courtroom.

“I have never harmed anyone before,” he said, and Warren noted that his criminal record included only a couple of citations for public drinking and one for criminal trespass. “I am truly sorry. That night, I was drunk. I should have stood up to MJ (Mohamed). I had nothing against Freddy.”

Francis Akoa, the dead man’s brother, told Warren that his brother’s death leaves five children without a father and two grandchildren without a grandfather.

He also described having to call his mother to tell her that one of her sons was dead.

“To hear the scream on the phone from my mother, that is something a son should not have to hear,” he said

After the sentence, Francis Akoa at first declined to comment on the sentence and then said only, “unfair.” Members of Teshome’s family, who filled the courtroom, said they felt the sentence was just.

Teshome’s stepfather, mother and sister all described a man doing well until he began drinking while attending Saint Joseph’s College. He dropped out after a little more than two years in college and became homeless, they said.

Before Tuesday’s hearing, prosecutors and Gail had agreed that Teshome would be sentenced to a maximum sentence of 30 years, with all but 20 years suspended. Alsop argued for that sentence, while Gale asked Warren to sentence Teshome to five years in prison.

Gail said that Warren’s sentence split the difference between the two. He said that it was appropriate that Mohamed got the stiffest sentence, since Gail said the evidence suggests he was the primary aggressor toward Akoa.

Warren said the severity of the beating and the impact on Akoa’s family were the chief aggravating factors he considered. He said Teshome’s willingness to take responsibility, his remorse, youth and a good chance at rehabilitation all argued for lesser sentence, Warren said.

Teshome has already been behind bars for nearly two years.