The incident began at about 11:45 p.m. Friday when police received several calls of gunshots heard in the area of Sagewood Court in northwest Gilroy.
An officer a few blocks away was conducting a traffic stop when he saw a Volkswagen Passat drive by without its lights on, police said.
The officer alerted another officer, who tried to pull over the vehicle. However, the vehicle failed to stop and tried to flee at speeds of more than 120 mph, according to police.
During the pursuit, staff from the St. Louise Hospital in Gilroy told police that a shooting victim had arrived there to seek treatment for his wounds, which are not considered life threatening. The victim was later released.
As the pursuit left Gilroy and entered San Benito County, the occupants of the suspect vehicle discarded a gun that was later recovered by Gilroy police.
The pursuit, which endangered the lives of numerous other motorists and pedestrians, was ended with assistance of deputies from the San Benito County Sheriff's Department when the two suspects were arrested in Hollister.
The suspects were taken back to Gilroy by police, whose investigation revealed that the suspects arrived at a party in the area of Sagewood Court where the 18-year-old, Roberto Martinez, allegedly drew his weapon and fired shots at the victim.
Some of the attendees at the party, as well as the suspects, are believed to be criminal street gang members or associates, according to police.
Martinez, as well as the juvenile suspect, face charges of attempted murder, conspiracy, possession of stolen property and felony evading police officers.
Anyone with information about this incident is urged to call the Gilroy Police Department's Anti-Crime Team at (408) 846-0350 or the anonymous tip line at (408) 846-0330.