A Santa Rosa man has been arrested on illegal firearms possession charges for the second time this month, police said Wednesday.

The recent legal problems of 20-year-old Pablo Barajas-Curiel began May 5 when he was pulled over for a vehicle code violation by police who were providing security near a Cinco de Mayo festival in Santa Rosa.

Police found drug paraphernalia and a semi-automatic gun with an attachable flashlight and laser when they searched the car, they said.

The gun was reported stolen 11 years ago, according to the Sonoma County Sheriff’s Office.

Barajas-Curiel was booked into the Sonoma County Main Adult Detention Facility on firearms and theft-related charges, but was released on bail the following day, police said.

Detectives continued their investigation and on May 17, 12 days after his first arrest, Barajas-Curiel was detained by police as detectives searched his home on the 2800 block of Pearblossom Drive.

They found another semi-automatic weapon, two illegal high-capacity magazines, ammunition for guns of different calibers, cash, drug paraphernalia, and a quarter pound of cocaine, they said. The gun’s serial number had been scratched out or removed so it could not be traced, according to police.

Barajas-Curiel was again arrested and booked into the Sonoma County Main Adult Detention Facility on a variety of weapons and drug charges, as well as one charge of committing a felony while out on bail, police said.

He is being held at North County Detention Facility, and is scheduled to appear in court on Friday, according to county records. His bail is set at $560,000.

Filipa Ioannou is a San Francisco Chronicle staff writer. Email: fioannou@sfchronicle.com Twitter: @obioannoukenobi