WHEATON, Ill. (AP) — An Illinois judge has handed a suburban Chicago man a 35-year prison term for fatally shooting his cousin in the head and pushing his body out of a vehicle.

DuPage County prosecutors say a circuit judge sentenced 22-year-old James Hernandez on Wednesday. The West Chicago man won't be eligible for parole until his entire sentence is served.

Hernandez earlier Wednesday pleaded guilty to first-degree murder in the death of 27-year-old Enrique Hernandez, who was also from West Chicago.

Prosecutors say the cousins were in a vehicle together on Nov. 20, 2015, when James Hernandez shot Enrique Hernandez. Prosecutors say he then shoved the body onto a roadside in unincorporated West Chicago. He also stole his cousin's cellphone and wallet.

Hernandez has been held in jail since his 2015 arrest.