Testimony began Monday in the trial of a Santa Rosa man charged with gunning down his romantic rival outside a brewpub two years ago.

Ryan Mitchell Dietz, 31, is charged with killing former Sonoma County correctional deputy Jack Romero, 33, also of Santa Rosa, outside Third Street Ale Works in June 2011.

Prosecutor Jane Murray said in opening statements that Dietz shot Romero 11 times after he saw the victim leave the brewpub with the mother of Dietz's three children, former YMCA dance instructor Garicka Rush, 34.

Romero and Rush had been carrying on an affair and set up a tryst for $2 beer night, Murray said.

"Jealousy, love, lying, deception, violence, sex and cold, calculated murder," Murray told the seven-woman, five man jury. "That's what this case is about."

Dietz has pleaded not guilty to murder with an enhancement for using a .40 caliber handgun. His lawyer, Joe Bisbiglia, accused investigators of "reverse engineering" the case, which he said was based solely on circumstantial evidence and unreliable witnesses.

Dietz faces a life sentence if convicted. Rush, who has pleaded no contest to being an accessory after the fact for hiding ammunition, is expected to testify.

Murray said the night of the slaying, Dietz was babysitting the couple's children, taking them to a birthday party, when Rush concocted an excuse to step out of the house by herself.

She told her longtime boyfriend she was going to spend the night at Sutter Medical Center, where her sister had just delivered a baby, Murray said.

But instead, Murray said Rush picked up Romero, a former neighbor at a Santa Rosa apartment complex, and drove to the brewpub. Murray said they were in a "intimate relationship" that began a year earlier.

Dietz was jealous of Romero and argued with his girlfriend about him often, Murray said.

"To say that the defendant and Garicka Rush's relationship was rocky probably would be an understatement," Murray said.

Romero resigned from his job as a jail guard in 2008 after an undisclosed internal investigation.

Murray said they drank until midnight, when the bar closed, and walked outside, mingling with other patrons for a while.

At some point, Rush and Romero became separated. That's when Rush heard shots ring out in an alleyway just steps from the pub, Murray said.

An autopsy revealed Romero had been shot eight times in the back, once in the neck and once in the top of the head, Murray said.

Witnesses testified they saw a man fitting Dietz's description get into a minivan and speed off shortly after the shooting.

Just how Dietz is alleged to have known his girlfriend was downtown is unclear. But Murray suggested a cellphone app, Google Latitude, that Dietz and Rush used to display their locations to each other may have played a role.

Rush was evasive when questioned by police, Murray said. Detectives followed her the next day as she dumped .40 caliber ammunition into trash cans behind several Santa Rosa stores, Murray said.

Dietz called her from work and asked her to dispose of the bullets, Murray said.

He was arrested the same day. He remains in custody.