A Colorado man was sentenced to 50 years in prison on Thursday for fatally shooting a northwest suburban man almost three years ago in West Dundee.

Gary M. Bennett, 38, of Denver, was convicted in March of first-degree murder and concealing a homicidal death in 36-year-old Bartlett resident Keith K. Crawford’s slaying, according to a statement from the Kane County state’s attorney’s office.

Bennett shot Crawford on Aug. 10, 2014, to avoid paying a debt for drugs, prosecutors said.

On the night of the shooting, Bennett and co-defendant Joan Sebastian Vado-Bonilla, 29, of West Dundee, drove to a party in unincorporated Dundee Township, prosecutors said. Bennett persuaded Crawford to take a drive with them out near Valley View, so Bennett could partially repay him and purchase more cocaine.

As Vado-Bonilla drove, Bennett pulled a gun in a rear seat of the vehicle and shot Crawford, who was riding in the front passenger seat, in the back of his head, the statement said.

Crawford’s body was dumped in a garbage bin at an apartment complex on Todd Farm Road in Elgin, and was never found.

The case went unsolved for nearly a year before Vado-Bonilla agreed to cooperate with investigators, prosecutors said. He pleaded guilty in December 2015 to a felony count of concealment of a homicidal death and currently awaits sentencing.

Bennett, who formerly lived in Algonquin, must serve the full murder sentence, according to the state’s attorney’s office. He received credit for the 690 days he served in the Kane County Jail.