A 47-year-old man pleaded guilty to killing his cousin with a hammer during an attack at a mall, the Fulton County District Attorney’s Office announced Wednesday.

Hagie Cham was charged with murder, felony murder and aggravated assault for the death of 42-year-old Mohamadou Touray. He was scheduled to stand trial last week for the Aug. 7, 2010 incident, but instead pleaded guilty after jury selection and was sentenced to life in prison.

Several witnesses saw Cham hit Touray with a hammer at least three times in his head and chest during an attack inside a discount mall on Godby Road in College Park, prosecutors said. Cham confessed at the scene and was arrested, authorities said.

Touray was transported to Grady Memorial Hospital, where he died the next day.

Cham told police that he was upset about Touray’s alleged affair with his wife.