An Elgin murder suspect has been convicted of trying to sell cocaine near a church in the northwest suburb in 2014.

A Kane County jury found 30-year-old William M. Ingram guilty Monday night of three felony drug charges, including possession of a controlled substance with intent to deliver within 1,000 feet of a church, and a misdemeanor count of driving with a suspended license, according to a statement from the Kane County state’s attorney’s office.

Ingram was also charged with murder in October for the April 30, 2015, shooting death of Devonte Turner in Elgin, the Sun-Times reported at the time.

Officers saw Ingram drive into a parking lot about 8 p.m. on June 20, 2014, in the 800 block of Tollgate Road in Elgin, prosecutors said. The officers, recognizing Ingram, knew that he was a parolee driving on a suspended license and that there was a warrant out for his arrest.

After police removed Ingram from the car and placed him under arrest, they found a plastic bag containing 1.7 grams of cocaine on the ground between the car and the open car door, the state’s attorney’s office said. He also had $4,700 in cash on him.

He told investigators he had gone to the parking lot to sell drugs because he needed money, prosecutors said. The parking lot was about 200 feet away from a church.

Judge Donald M. Tegeler Jr. set Ingram’s next court date for Sept. 29 for motions and sentencing, according to the state’s attorney’s office. His next court appearance for the murder case is scheduled for the same day.

His bond in the drug case was revoked upon his conviction, prosecutors said. His bond in the murder case was set at more than $4 million.