A San Francisco murder suspect's attorney sought assurances Wednesday that he would not be arrested for arranging what prosecutors called a "blatant act of witness intimidation" involving eight suspected gang members who stood up during a witness' testimony.

The defendant, Charles "Cheese" Heard, 25, was ordered to stand trial Wednesday on murder, attempted robbery and weapons charges linked to the slaying of Richard Barrett, 29, outside a Broadway nightclub in November 2008. Prosecutors say that Heard was after Barrett's gem-encrusted pendant of the Flintstones' Bamm-Bamm character.

During the first day of the preliminary hearing on Tuesday, just as a star witness was asked whether she recognized anyone as responsible for Barrett's shooting, eight reputed gang members stood up in unison, crossed their arms and stared at the witness.

The witness - a Texas woman who was in San Francisco for a conference and with friends when she saw the 1 a.m. shooting - nonetheless identified Heard as the gunman.

Prosecutor Michael Swart vociferously objected that the eight men who stood up amounted to "blatant witness intimidation."

After the hearing, the eight men were arrested on suspicion of gang-related witness intimidation. It is not clear who ordered the arrests. No decision has been made as yet on whether the men will be formally charged.

Heard's attorney, Eric Safire, acknowledged Wednesday that he arranged the incident to possibly confuse the identification by the witness.

Safire then sought assurances from Judge Wallace Douglass and the prosecutor that he would be immune from prosecution. "Before I continue, I want a representation from the district attorney's office that I'm not going to be arrested," Safire said, adding that the men were "here at my request - I motioned for them to stand up."

He said the men's arrest created a "chilling effect on my ability to represent my client." He threatened to withdraw from the case.

"I can't guarantee that you won't be arrested," Douglass said. "The district attorney can arrest who he wants."

Swart called Safire's threatened withdrawal from the case "just another delaying gamesmanship on the part of Mr. Safire to prevent this witness from testifying."

Safire declined to question the star witness, whom The Chronicle has not identified at the request of prosecutors.

"I don't want to get arrested," the defense attorney explained later. "If (the eight men arrested Tuesday) intimidated the witness, you know what my cross examination would do to her?"

Brian Buckelew, a spokesman for the district attorney's office would not rule out charging Safire. "Our office is providing no such assurance."

The woman's testimony was followed by another courtroom revelation - this one surrounding what police said triggered the slaying: the pendant of the Bamm-Bamm character.

A witness testified how he - and not a robber - had taken the bejeweled pendant from the dying man. The man, Karl Rodriguez, an acquaintance of the victim, said he then arranged to return it to the man's family.

Rodriguez was only interviewed by police this month. It is unclear why the victim's family had not alerted police to the fact that they had recovered the purportedly missing jewelry.

Rodriguez recounted how he heard what sounded like firecrackers, emerged from the bathroom of the Fuse nightclub and saw the man on the floor. Rodriguez said Barrett was gasping for air, clutching his chest with one hand, and holding the chain and pendant with the other.

Rodriguez grasped the pendant. "I knew I could get it back to the family," he said. "It was the proper thing to do."