SANTA CRUZ, Calif. -

A father and son with a long history of gang involvement were arrested after police said the father carjacked a family who was delivering holiday tamales. Police said the victims are very lucky to still be alive.

The victims, a family of four, reported that a man with a gun tried to carjack them while they were delivering tamales to their son's teacher on the 100 block of Bixby Street Wednesday. Police said the suspect, later identified as 39-year-old John Thomas, walked up to the car a demanded that they let him inside.

Police said that John Thomas had a gun and pointed it at the victims, and at one point started beating on the car windows. The woman in the car was able to grab her 3-month-old baby and escape, said police.

However, John Thomas confronted the man who was driving the car and tried to shoot him, said police. The suspect put the gun to the victim's chest and pulled the trigger several times, but the gun never went off, said police.

During the investigation, police discovered that the gun was loaded with the wrong type of ammunition. "Thomas had .380 caliber ammunition intended for a semi-automatic handgun loaded into a .38 caliber revolver. Because of this, thankfully, the firing pin did not strike the bullet primer to fire the gun," wrote police in a news release.

John Thomas was arrested later the same day on the 300 block of Ocean Street. After searching the area where he was arrested, officers said they found the gun that Thomas used.

Police served a search warrant at John Thomas' home on the 300 block of Soquel Avenue, which led to more trouble for the Thomas family.

According to police, 21-year-old Brandon Thomas, the suspect's son, was at the home during the search and confronted officers. He was detained and also searched.

Officers said the son had a loaded 9mm handgun and is a known gang member. Brandon Thomas was booked into jail on charges that he is a gang member in possession of a loaded firearm.

Police said that the father, John Thomas, has a long criminal history.

While investigating this case, detectives said they uncovered another case where John Thomas pointed his gun at a driver and tried to carjack them.

John Thomas is currently on parole for violent crimes in Santa Cruz but his criminal history in the area that dates back to 1992, said police. Like his son, he is a known gang member. Since his release from prison he has had several arrests for parole violations, said police.