A man was ordered held without bail Saturday after allegedly stabbing a friend multiple times during a dispute over a truck in north suburban Skokie.

Emmanuel Hernandez, 18, is charged with felony counts of attempted murder and aggravated battery in the attack, which happened Thursday at Hernandez’s home in Skokie, according to Cook County prosecutors and court records.

Hernandez, a 31-year-old man and Hernandez’s roommate were working on the truck Thursday at Hernandez’s home in the 4300 block of Oakton Street when it started raining, prosecutors said. After moving inside, an argument broke out when the 31-year-old accused Hernandez of breaking the truck.

Hernandez’s roommate told both to leave, and while Hernandez and the 31-year-old were on the front steps, Hernandez stabbed the older man multiple times, prosecutors said.

Officers arrived a short time later and arrested Hernandez.

The roommate told officers that Hernandez typically carries a switchblade, and a gold knife covered in dried blood was recovered from a nearby lawn, according to prosecutors.

The 31-year-old was taken to a hospital and treated for his wounds, which included lacerations to his liver that required surgery, according to prosecutors.

Hernandez was convicted of criminal sexual abuse last year as a juvenile and sentenced to 11 months in a juvenile detention center, prosecutors said.

Hernandez’s assistant public defender told Judge Susanna Ortiz that Hernandez stays with his mother and has lived in the Skokie area his entire life.

Ortiz denied him bail and set his next court date for Tuesday.