A Chicago man who pulled out a gun during a murder victim’s burial and shot into the grave in front of a crowd of mourners has been sentenced to 15 years in federal prison.

“You ain’t [expletive],” Elston Stevenson, 57, said before he fired a single bullet, according to the Justice Department (DOJ). “You got what you deserved.”

It happened at the Evergreen Cemetery in Evergreen Park on Nov. 22, 2017, authorities said. Stevenson fled the funeral, waving his gun at the mourners as he ran. Police arrested him near the cemetery gate.

WHAT IS BEHIND THE VIOLENT SHOOTINGS IN CHICAGO?

“When a felon brings a loaded gun to a populated area and uses the gun to threaten and endanger strangers, this conduct will not be tolerated,” Assistant U.S. Attorney Cornelius Vandenberg argued in the government’s sentencing memorandum.

(Cook County Sheriff's Office)

Murad Talib had been killed two days earlier, gunned down in his driveway in a Palos Heights subdivision, according to Patch.

Investigators looked at Stevenson in connection with the slaying but determined he was not involved in the actual homicide, the outlet reported.

Stevenson pleaded guilty to one count of illegal possession of a firearm by a previously convicted felon before a judge handed down the sentence last week.

Gun violence has plagued Chicago for years and has spiked in 2020 -- with at least 1,782 people shot so far this year. That’s 550 more than at this point in 2019.

CLICK HERE TO GET THE FOX NEWS APP

Over the Fourth of July holiday weekend, at least 17 people were killed by gunfire, including multiple children. Another 70 people were wounded.

On Monday, Chicago Police Superintendent David Brown responded to the recent violence, calling on the city and criminal justice system to step up and help police tackle the issue.

“My hopes are the deaths of these young people won’t be in vain and will prick the hearts of the decision-makers who release violent offenders on electronic monitoring back into these very communities to mete out this kind of violence every weekend,” he said.

Fox News’ Stephanie Pagones contributed to this report.