Most of Officer Ronald Gehrke's neighbors liked seeing his police cruiser parked outside his house near San Francisco's Lake Merced. It made them feel safe.

Trouble was, his bosses thought he and his cruiser were over in the Inner Sunset District, where the 19-year police veteran was supposed to be walking a beat.

Authorities aren't sure what the 52-year-old Gehrke was doing inside his home while he was on the taxpayers' time - but they don't think it involved work. After undercover officers watched him go home repeatedly while he was on duty, police persuaded prosecutors to file 10 misdemeanor counts of theft of public money against him.

It's a rare instance of criminal charges being filed against a San Francisco officer for alleged on-duty misconduct. Gehrke has been suspended without pay, and if he's found guilty, chances are he won't have to worry about coming to work.

"If he is convicted, he will get fired - he's done," conceded his attorney, Stuart Hanlon.

Gehrke was arrested last year on the day after Christmas after the undercover officers saw him park his patrol car at his home during his shift for more than three hours on at least 10 occasions, according to Hanlon.

At the time, the Taraval Station officer was supposed to be walking a beat on Irving Street, where he's been assigned for the past five years.

"Most of his neighbors loved him," Hanlon said. "They felt safe because his police car was there."

Most, but not all.

One neighbor wrote a letter to police, wondering why a patrol cruiser was often parked outside Gehrke's home, Hanlon said. The letter prompted the police investigation.

The undercover officers first followed Gehrke home on July 25, 2012. Again and again over the next month or so, prosecutors say, Gehrke abandoned his beat and went home.

In all, Gehrke is accused of stealing about $950 in public money - his salary for the hours he was allegedly holed up at home. He is due back in court Oct. 24, his 53rd birthday, when a judge will schedule a trial.

If convicted of all 10 misdemeanors, Gehrke could be sentenced to a year in County Jail. His lawyer says that would be a crime.

Gehrke has received three commendations during his years on the force, the lawyer said.

"Why are we going after this guy, who is a decorated officer, when we have other officers who are engaged in allegedly heinous conduct?" Hanlon said.

In fact, Hanlon said, lots of cops take long breaks while on duty.

"What I'm trying to evaluate is, what is acceptable in the police culture?" he said. "This is a high-stress job. Some policemen go to the gym, for many hours, or take a walk."

The leader of an Inner Sunset neighborhood association said Gehrke - who stands out in a crowd at 6-foot-5 - was "a local favorite."

"He was known as the neighborhood beat cop," said Adam Greenfield, president of the Inner Sunset Park Neighbors. "He was a guy who you could easily approach, very amiable, warm and personable."

Greenfield said that when Gehrke stopped coming around last year, people assumed it was because police had reorganized the beat patrol system. He said he didn't know Gehrke had gotten into legal trouble.

"Whether he is innocent or guilty," Greenfield said, "it's very sad."

One of the officer's neighbors can't figure out what all the fuss is about.

"He's a great guy," said Angela Jee, who lives across the street from Gehrke. "I don't understand why the Police Department is doing this - they should be investigating way more serious things than this.

"It's ridiculous, absolutely ridiculous."