SANTA CRUZ - A 20-year-old man admitted to robbery and other charges Tuesday, in the midst of a jury trial, after his girlfriend tearfully admitted she had been lying when she had provided something of an alibi for him, prosecutors say.

Fernando Ortiz Rodriguez of Santa Cruz admitted to second-degree robbery, dissuading a witness and use of a weapon, in an open plea to the court in exchange for a four-year prison term. Judge Timothy Volkmann scheduled sentencing for Sept. 14.

Rodriguez was arrested in the early Nov. 3, after a resident of an apartment complex on North Pacific Avenue saw him breaking into a car and called 911, prosecutor Charlie Baum said.

Rodriguez strode up to the woman and she ran into her apartment and locked the door, Baum said. He chased her, shouting she was a "snitch," he said, before walking up to a neighbor, armed with a knife, and robbing him of his MP3 player.

Rodriguez' girlfriend testified that Rodriguez was in the neighborhood on his way to her house, he said.

But under cross-examination, the woman broke down and admitted that was a lie, he said, and her admission promoted Rodriguez to change his plea.

In explaining the sentence, Volkmann said he considered the robbery "relatively low-grade" and was more concerned about the felony charge of using force or threats to dissuade a witness.

He said the way Rodriguez approached the woman was "extremely disconcerting."

Rodriguez, who listened to the proceeding with help from an interpreter, showed little emotion Tuesday as he sat beside public defender Mark Briscoe in a button-down shirt with his hair neatly slicked back.

Rodriguez has credit for 244 days in County Jail and will serve the balance of the four years at 85 percent time, Volkmann said. He told him the convictions equate to a second "strike" and that another felony conviction could mean a possible life sentence.

Briscoe said his clients are generally open with him, but that he had no idea the girlfriend's story was false. He said witnesses identified a black man as the suspect, and Rodriguez was never found with the stolen property or the knife.

He said a shorter prison sentence might scare Rodriguez enough to motivate rehabilitation.

"It's tough in this criminal justice system, with the Draconian sentences legislators have enacted, to tailor a sentence capable of taking into account that my client is a pretty young man who has had a tough life and has no violent history," Briscoe said. "He has a history of stupid kid stuff. Sending a 20-year-old kid away for four years is creating a career criminal."

Trial started last week. After the pleas were accepted, Volkmann called jurors in, thanked them and excused them.

Follow Sentinel reporter Cathy Kelly on Twitter @cathykelly9