A SWAT team convinced a heavily armed and suicidal man to surrender in Capitola after for several hours of negotiations Sunday night, according to Capitola police.

The incident began at 10:22 p.m., when at least three gunshots were heard near Bay Avenue in Capitola.

James Gomez's father dialed 911 and reported his 24-year-old son was armed with rifles at the city's corporation yard on Kennedy Drive.

Gomez wanted to commit suicide-by-cop, his father said.

As officers were arriving in the area, Gomez called 911. He told dispatchers he was distraught and wished to "encounter" police, police Sgt. Mark Gonzalez said.

A Santa Cruz County Sheriff's SWAT team, California Highway Patrol officers, California State Parks deputies, and paramedics were called in while a city watch alert was sent out to nearby Capitola residents.

The SWAT team negotiated with the Capitola man for "numerous" hours before he agreed to surrender on the 400 block of Kennedy Drive, police said.

"Capitola Officers and SWAT team members located and seized two rifles, numerous rounds of ammunition, a tactical military style vest and a knife in the area where Gomez surrendered," Gonzalez said.

Gomez was transported and admitted to the Dominican Hospital Behavioral Health Unit for psychiatric evaluation before he was taken into custody. As of Monday morning, police had not released what criminal charges Gomez may face.