CHICAGO (CBS) — A 50-year-old man has been sentenced to 30 years in prison for fatally shooting a man who allegedly directed his daughter to a Back of the Yards home, where she was beaten and robbed at gunpoint in 2014.

Otis Harriel pleaded guilty Oct. 5 to murder before Judge James Obbish, according to Cook County court records.

READ MORE: Galewood Man Charged With Aggravated Battery In The Stabbing Of CTA Bus Driver

Martavian Emery and his sister were walking to a restaurant on April 25, 2014, when Otis Harriel’s daughter asked Emery where she could buy marijuana, prosecutors said at the time.

Emery directed her to a house in the 5400 block of South Winchester Avenue, where she was pistol-whipped and robbed at gunpoint, prosecutors said.

Early the next day, Harriel confronted Emery for information about the robbery and threatened those responsible, prosecutors said. A witness saw a gun inside Harriel’s hooded sweatshirt, and Emery and the witness entered the home where the robbery happened.

A short time later, shots were fired through a window of the home, prosecutors said. Police said Harriel was standing in the rear of the residence when he fired shots into the second floor.

Emery, 21, was inside the kitchen area of a home and was shot in the chest, He died at the scene, authorities said.

READ MORE: 2 Men Shot In River North

A 20-year-old woman sleeping in a bedroom was shot in the left knee and was treated at Mount Sinai Hospital, authorities said.

Harriel was arrested May 26, 2014, and had a .38 caliber gun in his possession, authorities said. Ballistics tests confirmed the bullets recovered from Emery were fired by that gun, prosecutors said. The witness also identified Harriel in a lineup.

Judge Obbish sentenced Harriel to 30 years in prison Friday, according to court records. He will receive credit for 592 days served in the Cook County Jail.

Harriel was booked into the Stateville Correctional Center on Monday to begin serving his sentence, according to IDOC records.

Harriel had previously been convicted of burglary and three drug charges.

MORE NEWS: Teammates Of Boy Killed In Waukesha Christmas Parade Tragedy Honor Him With Baseball Memorial

(Source: Sun-Times Media Wire © Chicago Sun-Times 2016. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)