The shooting happened a few minutes after noon in the driveway of the McDonald's at 898 S. Bascom Ave., across from the Santa Clara Valley Medical Center.
Police spokesman Officer Jose Garcia said it appears that the shooter walked up to the victim and shot him once at close range then ran north on South Bascom Avenue.
The victim was taken to Santa Clara Valley Medical Center. Garcia said that the man was put on life support sometime around 5 p.m., but he did not comment on whether police expected the victim's condition to improve.
Police are still searching for the shooter, who is described a Hispanic or white male in his late teens or early 20s with a light complexion.
Police have yet to recover the firearm and are assuming that the suspect is still armed and dangerous.
Nearby Del Mar High School was briefly locked down as a precaution, but the lockdown was lifted at about 2:30 p.m.
At about 3:45 p.m., the parking lot was still blocked off with crime scene tape and the northbound lanes of South Bascom Avenue were shut down. Garcia said the lanes reopened at about 5:30 p.m.
There were bloodstains and a black beanie on the ground where the victim had been shot. Bystanders had gathered outside nearby businesses to watch the police activity.
Garcia said it appears there was not much interaction between the shooter and the victim before the shooter opened fire.
He said the motive is not yet clear and that police are looking into whether the crime was gang-related. He said the area does have its "fair share" of factions of the Norteno and Sureno gangs.
Three employees of San Jose Trucking School, located next door to the McDonald's, said they were about to head out for lunch when they heard people screaming.
They went toward the commotion and saw the victim, who was gasping for air, they said.
"I saw blood coming out the back of his head," said one of the employees, who declined to give his name.
They said the victim looked young, like a teenager. Police have said he is in his early 20s.