Updated

A Texas teenager has been sentenced to life in prison for beating a homeless man to death in a trash bin.

Sixteen-year-old Michael Martinez Jr. of Abilene was tried as an adult in the 2007 death of 48-year-old Eric McMahon.

Martinez received the maximum sentence Wednesday and will be eligible for parole in 30 years.

Martinez testified during his trial that he was drunk and had left a party when he saw the homeless man in a trash container. He said an unknown man with a gun told him to kick and throw brick pieces at the homeless man.

But his confession to police didn't mention the man with a gun. And a witness testified that the then 15-year-old Martinez laughed as he kicked and hit McMahon.