SANTA CRUZ — Ronnie Boose stood on the North Branciforte Avenue sidewalk Wednesday morning, taking in the scene where an unspeakable tragedy had occurred just hours before and paying his respects to the two police officers who had been gunned down in this quiet neighborhood.

“I’m just trying to sort it all out in my mind,” said Boose, 44. “What the heck is going on in my city? In less than 30 days, crazy things have suddenly come down. It’s horrible.”

Heartbroken residents of this eclectic beach town are coming to grips not only with Tuesday’s shootings that resulted in first-ever deaths of Police Department officers in the line of duty, but other recent headline-grabbing crimes that have shaken the community.

Santa Cruz, better known as the welcoming tourist-and-college town with great surfing and a hippy vibe, has became national news for far different reasons.

Detective Sgt. Loran “Butch” Baker, a 28-year veteran who was near retirement, and Detective Elizabeth Butler, a mother of two young boys, were fatally shot by Jeremy Goulet when they went to his home to question him about inappropriate sexual advances toward a coffee shop co-worker. When Goulet was killed exchanging a barrage of gunfire with other law enforcement officers about 25 minutes later on nearby Doyle Street, he was wearing body armor and possessed three handguns — including two belonging to the dead detectives.

This, stunned residents say, is not who we are. But a recent spate of violence that includes high-profile cases of murder, rape and home invasion has this usually mellow coastal city of 60,000 on edge, said resident Maria Boutell.

“You always say that some things couldn’t happen here,” added Boutell, 45, who heard the gunshots that killed Goulet from her kitchen. “After yesterday, none of us can ever say that again. I don’t want Santa Cruz to be known as that sleepy little town that also has this terrible violence problem.”

As curious onlookers gazed at the area of the final shootout — a townhouse complex parking lot where bullet holes riddled wooden garage doors and masonry — some told harrowing stories that were straight out of a Hollywood movie.

Ken Maffie, 53, was in front of a Whole Foods across the street when gunfire erupted. He instinctively dropped to the pavement and crawled behind parked cars to the protection of a pillar.

“It was pretty scary because you couldn’t tell where the shooting was coming from,” Maffie said. “I kept yelling to people, ‘Get low! Get low!'”

Doyle Street resident Jesse Lemic shook as he described being questioned by Baker and Butler on Tuesday afternoon. Lemic had been walking in the alley where Goulet lived, and they wanted to make sure he wasn’t “Jeremy.”

“They were very professional and seemed like nice, decent people,” said Lemic, 65. “They were insistent, but they were just doing their job. The male cop shook my hand and said he hoped I understood why they had to be so insistent.” He paused. “I probably was the last one to see them.”

At a somber news conference Wednesday, Santa Cruz Mayor Hilary Bryant said the city shared “in the frustration, the anger, the concern, the grief.” Police Chief Kevin Vogel added there was no way he could adequately describe the anguish felt by his department, which has an allotted number of 94 officers but is even smaller because of vacancies.

The department was given the day off Wednesday as the Santa Cruz Sheriff’s Office and California Highway Patrol guarded the city.

Meanwhile, residents were soul-searching as they looked for reasons to explain the city’s violent turn. Voters in recent elections have favored moderates advocating law-and-order agendas, and statistically violent crime is down. But that has been no comfort this month.

A local martial arts instructor was fatally shot outside a downtown bar on Feb. 9. Two days later, a 21-year-old UC Santa Cruz student was robbed of her backpack and shot in the head while waiting at a bus stop near Natural Bridges State Park. The small-caliber bullet didn’t penetrate her skull, and she since has been released from the hospital.

The sprawling, heavily treed UC Santa Cruz campus has been on alert since a woman was beaten and raped along a walkway on Feb. 17 in the middle of Sunday afternoon. Three days later, a Santa Cruz couple — who were at home with their two young daughters — awoke in the early morning hours and fought off two would-be burglars who were armed with a sword and screwdriver.

“It’s all been very unnerving,” said Ryan Coonerty, 38, a former mayor and councilman and now a UC Santa Cruz lecturer. “The frustrating thing for me is that, more often than not, the crimes are committed by someone who just moved to Santa Cruz. We love having people come here, but recently some of have come to the community to do tremendous damage.”

Goulet was convicted in Oregon in 2008 on weapons charges and of peeping at a woman while she showered. He also had lived in Berkeley and had been fired from his coffee house job after being arrested Friday on a drunken disorderly charge. Goulet’s father told The Associated Press that his son, who had served in the military, was a ticking time bomb who had contempt for police and the justice system.

Other residents, though, said Santa Cruz has other, deep-rooted problems that result from its long-standing image as being lax toward things like vagrancy and drug use.

“There is an element that considers Santa Cruz a sanctuary city, where we’re pretty lenient,” said Boose, a member of the advocacy group Take Back Santa Cruz. “They hand out needles. Drug crimes are rarely punished. But there’s a fine line between compassionate and too lenient. We have some issues that just haven’t been dealt with.”

On Wednesday, Santa Cruz was confronting its collective pain.

“This community has dealt with other horrific crimes,” Coonerty said. “We dealt with the ’89 earthquake. But this is a very big deal. I don’t know if Santa Cruz will ever be the same.”

Contact Mark Emmons at 408-920-5745.