A former store clerk was sentenced to two years in prison for yelling racial slurs and threatening four men with a knife before slashing a vehicle’s tires in the west suburban Lombard.

Ranferi Basilo, 33, entered a guilty plea to a felony count of hate crime on June 4, the DuPage County state’s attorney’s office said in a statement. He was sentenced Tuesday morning by Judge George Bakalis.

Basilo, who has also used the last name “Basilio,” was a clerk on Nov. 8, 2018, when four men walked into his 7-Eleven store on Westmore Street, prosecutors said. Basilo allegedly yelled racial slurs at the four men, three of whom were African American and the other Hispanic.

The men left the store but were confronted by Basilo holding a knife and yelling more slurs, prosecutors said. The men ran away and left their car in the lot. Basilo then slashed the vehicle’s tires, prosecutors said. Lombard police arrived and arrested him.

Later, Basilo was released on a $75,000 bond, prosecutors said. He was taken into custody again following his sentencing hearing Tuesday.

“Hate crimes have no place in civilized society,” State’s Attorney Robert Berlin said in a statement. “These types of crimes victimize not only the intended target, but also entire communities.”

Basilo must serve 50 percent of his sentence before he is eligible for parole, prosecutors said.

Read more on crime, and track the city’s homicides.