CALDWELL -- An 18-year-old accused of shooting a member of a rival gang in the head pleaded not guilty to the charges in court Friday.

Francisco Gerardo Ramirez is charged with aggravated battery, unlawful discharge of a firearm, destruction of evidence and a possible gang sentencing enhancement in connection with the Sept. 6 attack.

MORE: Police: Gang rivalry, colored bandanna sparked Caldwell shooting

Police say Ramirez targeted the victim, a 22-year-old from Ontario, because the other man was carrying a blue bandana inside the territory of Ramirez' gang, a sign of disrespect. According to court documents, Ramirez confronted the 22-year-old outside a Nampa barbershop, then followed him in a car after the victim drove away.

Ramirez is accused of opening fire into the the victim's car near Mud Springs Avenue and Blue Springs Street in Caldwell.

The Ontario man was struck once in the back of the head. Police learned about the shooting after the victim turned up at a local hospital with a gunshot wound.

RELATED: Suspect sought after 22-year-old shot in Caldwell

According to investigators, Ramirez used spraypaint in an attempt to disguise his car after surveillance images of the vehicle were broadcast on KTVB and by other media outlets. He was arrested Sept. 14.

Ramirez is currently held in the Canyon County Jail on a $1 million bond. His trial is set to begin Jan. 24.