Isaac Velasquez, 32, of Marengo.

A Marengo man was sentenced on Thursday to six years in prison after pleading guilty in a case where he sold cocaine from a residence while a child was present.

Isaac Velasquez, 32, of the 600 block of East Grant Highway in Marengo, was indicted on three counts of unlawful delivery of a controlled substance, unlawful possession with intent to deliver a controlled substance, three counts of unlawful possession of a controlled substance and endangering the life or health of a child.

A criminal complaint filed in McHenry County Circuit Court alleges Velasquez sold 15-100 grams of cocaine on March 3, 2021.

The complaint also said he sold 1-15 grams of cocaine on February 23, 2021, and also on March 26, 2021.

During at least one of the transactions, a 10-year-old child was present in the residence where the transaction was conducted, the complaint said.

[Suggested Article]  21-year-old man killed by drugged, drunk driver who drove into oncoming traffic on Route 173 near Harvard

The investigation was led by the McHenry County Sheriff’s Office Narcotics Task Force.

Velasquez on Thursday pleaded guilty to one count of unlawful possession with the intent to deliver a controlled substance, a Class 1 felony.

In exchange, prosecutors dismissed the additional charges against him, including a Class X felony.

McHenry County Judge Robert Wilbrandt approved the plea deal and sentenced Velasquez to six years in the Illinois Department of Corrections.

He will also be required to pay over $3,800 in court fees and fines.