The victim waited in the restaurant until he thought that the suspects had left before getting into his vehicle to leave. At 17th Street and Superior Avenue, the victim spotted the suspects in the car behind him and pulled into a Denny's parking lot to evade them, but they attacked him and stole his cash, a cell phone and keys, police said in the release.
The man was taken to Hoag Hospital in Newport Beach with moderate injuries to his head and face.
Police believe the gang members came to Costa Mesa from Orange in a stolen vehicle with the intent to commit crimes.
Working with police in Orange who were familiar with the street gang, Costa Mesa officers were able to identify the final suspect and make an arrest Tuesday, according to CMPD Lt. Mark Manley.
"It's concerning when other gangs cross into Costa Mesa to commit their violent crimes," Manley said in an email. "Our patrol officers and Gang Enforcement Unit did an outstanding job responding to the call, disseminating timely information to neighboring agencies, and aggressively tracking down the outstanding gang suspect. This is what we do extremely well."
The Orange County district attorney's office is charging three of the juveniles as adults, according to the release.
They face charges of attempted carjacking, robbery, brandishing a firearm, conspiracy, criminal threats and a gang sentencing enhancement.