LOUISVILLE (WHAS11) -- The man charged in the death of a 7-year-old in 2017 pleaded guilty and accepted a plea deal on Feb. 18.

The prosecutor on the case amended his charge from murder to manslaughter in the second degree. 

"This is dangerous conduct and so that's what the manslaughter in the second degree reflects," Prosecutor Ryane Conroy said.

She said the plea deal is in the best interest of the commonwealth and Hobbs' family. 

"Plea negotiations are about what we think a jury would likely do but its also saving some of that emotional toll that would happen", she said. 

In the plea agreement, Wyatt Williams will serve 20 years in prison. Fifteen of those years are on the homicide charge, and five others are on gun violations. 

Conroy said, "You're firing off guns in a neighborhood, obviously he didn't know that he was sitting at the table, but this is what happens. This is what happens when you're firing off multiple rounds, babies can get hit and 7-year-olds can get hit and people can die."

Police said Williams fired the shot in May 2017 that went through Dequante Hobbs Jr.'s kitchen window hitting and killing him.

Investigators say it happened after a fight broke out during a dice game near Dequante's home. 

Police charged Williams in the death of Dequante Hobbs in August 2017

Hobbs' family was in the courtroom for the sentencing. 

"I'm very disappointed. Very, very. It's not a happy day for this family at all. Not a happy day," Henry Watkins, Hobbs' grandfather, said. 

His official sentencing by a judge is scheduled for April 8.

RELATED: 

Family, friends celebrate boy's birthday nearly 2 years after tragedy

One year after DeQuante Hobbs' death city agencies continue to combat violence

Family says death of 7-year-old leaves hole in hearts 1 year later

School dedicates butterfly garden in memory of Dequante Hobbs Jr.

â–ºMake it easy to keep up-to-date with more stories like this. Download the WHAS11 News app now.

Have a news tip? Email assign@whas11.com, visit our Facebook page or Twitter feed.