CHICAGO — A man who was arrested earlier this year after he was allegedly seen throwing heroin from the window of a car owned by a high-ranking Chicago police official was sentenced to two years in prison on Thursday, according to Cook County court records.

Kenneth Miles, 35, was found guilty of one count of possession of a controlled substance during a one-day bench trial, court records show. Cook County Judge Maria Kuriakos-Ciesil sentenced him to two years in prison, with credit for the 262 days that Miles has remained in custody since his initial arrest.

Miles was arrested Feb. 1 in the 500 block of North St. Louis Avenue after he was seen throwing more than $6,000-worth of heroin out the window of a car registered to Yolanda Talley, the CPD’s chief of internal affairs.

Talley’s niece was driving the vehicle. Despite her license being suspended at the time, responding officers did not take her into custody. Talley’s vehicle was returned to her shortly after Miles was taken into custody — a marked departure from the CPD’s typical evidence recovery protocol.

Bodyworn camera footage released earlier this year shows that Talley’s niece was quick to tell the officers that she was related to a higher-up in the CPD.

“Don’t worry about it ‘cuz my auntie’s probably your boss,” Talley’s niece told the officers.

CPD Supt. David Brown said earlier this year that the department asked the city’s Office of the Inspector General to investigate the police response.