A homeless man has been sentenced to prison for using paver stones to kill one man and injure others in Salt Lake City.

SALT LAKE CITY — A homeless man has been sentenced to prison for using paver stones to kill one man and injure others in Salt Lake City.

Kepedro Dedrick Kegler, 43, whose family said he struggled with drug use and mental illness, was ordered to serve at least 18 years and up to life in prison Friday.

As part of a plea bargain with prosecutors, he admitted in June to reduced charges of murder and attempted murder, both first-degree felonies; and aggravated assault, a third-degree felony.

In July 2017, Kegler slammed two 53-pound paver blocks from behind onto Kevin McCann, who was sitting down looking at a tablet, court documents show. McCann later succumbed to his injuries.

Kegler also assaulted another man sleeping under an overpass nearby at 550 W. 500 South, and a third man told investigators he was playing a game on his cellphone when he was attacked from behind by a man yelling, "Die, die, die."

Family members in letters to the judge urged leniency, writing that Kegler has struggled with mental illness and methamphetamine use, and didn’t understand afterward what he had done. He was staying in a shelter, saving up to buy a ticket home to St. Louis and had yet to meet his 6-month-old granddaughter, they wrote.

Kegler originally was charged with aggravated murder, plus two counts of attempted aggravated murder, in addition to the assault charge.

Third District Judge Mark Kouris on Friday ordered him to serve consecutive sentences of at least 15 years and up to life on the murder conviction, and at least three years for attempted murder. Kouris also recommended mental health and drug treatment, allowing a prison term of up to five years on the assault conviction to run at the same time as the others.