(KRON) — A group of teenagers carjacked a victim’s BMW sedan at gunpoint in Castro Valley, deputies said.

The victim told 911 dispatchers that three thieves demanded his vehicle on Sunday at 8:45 p.m. and, in fear for his safety, the victim got out. The group took off in the BMW driving from Crestfield Circle to 105th Avenue in Oakland, the Alameda County Sheriff’s Office said.

Deputies attempted to conduct a high-risk traffic stop, but the driver fled up 105th Avenue.

“Deputies pursued the suspects for a little over five miles, then terminated the pursuit for public safety,” the Alameda County Sheriff’s Office wrote.

The teens continued to drive at a high rate of speed and crashed the BMW into a parked vehicle on 50th Avenue near Bancroft Avenue. The trio bolted out of the stolen car, ran, and attempted to evade arrest.

With aerial surveillance from the Oakland Police Department’s air team, deputies found the auto thieves, plus a fourth suspect, on 50th Avenue.

Four teenagers — including three minors — were arrested. Deputies booked Angel Aguilar Lopez, 18, of Oakland, into the Santa Rita Jail. The juveniles were booked into the Juvenile Justice Center.

During a search of the area, an ACSO K-9 unit located a handgun wrapped in a sweatshirt and hidden under a vehicle. The gun was registered as stolen out of Oakland.

Another BMW that was carjacked in Piedmont was also found in Oakland on Sunday. A mother had just put her child into the vehicle when she was confronted by two men who demanded her keys, purse, and cellphone. Piedmont police wrote, “The suspects allowed the victim to remove the child from the vehicle and then fled in her 2018 black 4-door BMW.”

“The vehicle was traced to several different locations in Oakland throughout the day,” PPD wrote. Five people were detained on International Boulevard and one 19-year-old Rodeo man was arrested.