In a surprise twist in the murder trial of Jacobo Ruelas, one of the prosecution's star confidential witnesses said he would refuse to testify, but then told the jury he witnessed the 1997 attack on teenager Kristopher Olinger.

The development was the latest twist in a case dominated by protected witnesses and security concerns. After Thursday's jury session, Judge Julie Culver closed a hearing in the next courtroom regarding the custody status of Witness 188, who had just reluctantly testified.

Culver barred The Herald from attending, saying the public's right to know was outweighed by concerns about the witness' safety. She said "a message was sent to Witness 188" outside of court and that he was concerned for his wife and five children.

Other witnesses were threatened, she said, and a trial observer intimidated a confidential witness on the stand by flashing his hand in the position of a gun.

Witness 188 is a childhood friend of Ruelas, 34, who is charged with murdering Olinger, a 17-year-old Monterey High School student, during the commission of kidnapping, carjacking and robbery near the Pacific Grove Recreation Trail.

Witness 188 is the only confidential witness to sign an immunity deal but decline placement in the witness protection program.

The Soledad man was jailed Wednesday after he indicated he would not testify. After the lunch break on Thursday, he again told trial Judge Mark Hood he would remain mum, despite threats of criminal charges and findings of contempt.

But when the jury was brought in and prosecutor Jeannine Pacioni threw him a couple of softball questions — where were you born? — he started answering. When he hesitated to talk about the events of Sept. 18, 1997, and Hood ordered him to answer, he kept talking.

Witness 188 said he was driving Ruelas, younger brother Angel Ruelas and Witness 194 from Soledad that night on a hunt for girls. He conceded there "may have been" talk of beating up someone.

Eventually they made their way to the Monterey area, where they stopped in a large parking lot "because it seemed reasonable." According to Witness 194's earlier testimony, Olinger was sitting alone in his mother's car, seemingly sleeping.

Witness 188 said the Ruelases got out and jumped in the other car and took off driving. He didn't see if anyone else was in the car or who was driving, but he followed. When the Ruelases stopped at a dirt turnout next to the ocean, he parked 30 feet to 40 feet away.

What happened next, he said, was unexpected and shocking.

"They pulled out the kid that I didn't even know was in there and stabbed him multiple times," he said.

The witness said he could not see who was doing the stabbing. Pacioni reminded him that he testified before the grand jury in 2006 that Jacobo Ruelas did the stabbing.

Olinger's body was found the next morning by a passerby. Pacioni earlier told the jury Olinger was stabbed 29 times and thrown off the cliff. Blood trails showed he survived long enough to pull himself back up to the turnout where he died.

The Ruelases and other witnesses were implicated nearly nine years after the crime by palm and fingerprints lifted from Olinger's stolen car, found abandoned in San Jose after his slaying. Angel Ruelas pleaded guilty to the crimes and is serving life without possibility of parole.

On cross-examination by defense attorney Andrew Liu on Thursday, Witness 188 described his alarm when he was awakened one morning in 2006 by more than a dozen officers armed with a search warrant who arrested him in connection with the murder.

Like Witness 194, he was told he could cooperate or be charged with murder, kidnapping, robbery and carjacking. Liu suggested the two witnesses colluded in an effort to protect themselves and take a piece of the $50,000 reward posted in Olinger's murder.

Under questioning, Witness 188 acknowledged Pacific Grove police Cmdr. Tom Uretsky told him others knew about the reward and might rush to "drop a dime on him" to collect. The commander then told his own detailed version of the crime before placing Witness 188 in a cell next to Witness 194. The two witnesses spoke again the night before Witness 188 gave his first interview to investigators.