As his nine grueling days of testimony drew to an end Tuesday, criminalist Dennis Fung flashed a rare smile after having gone longer than anyone else on the witness stand so far in the O.J. Simpson double-murder trial.

Then he vigorously shook hands with the former football star in clear view of the jurors, electrifying the courtroom.

Warmly smiling, Simpson firmly gripped Fung's hands in a gesture that reminded observers of two combatants congratulating each other after a furious match.

"That's the way you shake hands with someone after you've played the toughest game in your life and now it's over," said author Joe Bosco, who is writing a book about the trial.

With the often-sarcastic, never-relenting Barry Scheck as its man in the ring, the defense team had just spent more than a week pummeling the soft-spoken Fung with allegations that he helped police frame Simpson for the murders of his former wife and her friend last June.

After a last round of requestioning and re-requestioning, Fung gave a visible sigh of relief as he stepped down from the stand and perfunctorily shook hands with prosecutors.

Then defense lawyer Johnnie Cochran Jr. strode over, offering his hand. Looking surprised, Fung extended his hand. Then Simpson and Fung clasped hands, and Robert Shapiro embraced the state's key witness.

The surprising emotions of the moment apparently caught sheriff's deputies off guard, since they have barred any handshaking with Simpson.

Outside the courthouse, Fung would not reveal his feelings about the defense team or the handshakes. Cochran, however, was not equally taciturn.

"It's not ever personal; it's never personal. We're just doing our job," Cochran said. "I think he understood that."

The defense handled Fung's testimony as a key block in building its theory that police conspired to frame Simpson by planting a glove at his estate and sprinkling his blood in incriminating places.

With DNA test results on blood evidence yet to be presented to the jury, defense lawyers focused on Fung's evidence-collection methods, which they said were sloppy and compromised the evidence, contaminated the crime scene and may have been part of a frameup.

Fung admits he stored blood samples on the floor of a warm evidence truck for seven hours, left a vial of Simpson's blood unrefrigerated overnight and failed to collect crucial stains from a gate at the crime scene until three weeks after the murders.

Making the most of Fung's admittedly hazy memory of his precise movements while collecting evidence, defense lawyers suggested that Detective Philip Vannatter kept a vial of Simpson's blood overnight in order to plant it at strategic locations.

In their rebuttal, prosecutors presented news footage, marked with a time stamp, all but showing Vannatter giving Fung the blood vial June 13-the day after the slayings-when Fung said it was delivered.

After testifying, Fung said he was happy to be off the witness stand and ready to return to work. He wished his colleague, Andrea Mazzola, good luck when she takes the stand Thursday.

"I hope she does good," Fung said, then exclaimed a simple "Bababooey" when someone asked his thoughts on being the butt of jokes on Howard Stern's radio talk show, where "bababooey" frequently is uttered.

Separately, a lawyer for author Marc Eliot, who is working with trial witness Brian "Kato" Kaelin, said that taped comments Kaelin made to the author before he took the witness stand could hurt the defense.

The interviews, which Eliot used to write a book manuscript, indicate Kaelin told only part of the story of his relationship with Simpson, said Leonard Marks, Eliot's lawyer, in a telephone interview with The Associated Press. Marks said the prosecution was planning to call back Kaelin as a hostile witness.

In his testimony, Kaelin had said that, "in the entire time that he knew O.J. Simpson and Nicole, they had a good relationship," Marks told the CBS Evening News. "Over and over again on the tapes, he talks about rage, fury, fighting."

NBC News aired a brief exchange from one tape it obtained:

Kaelin: "She used to tell me that O.J. was gonna kill her, one day."

Interviewer: "She told you this?"

Kaelin: "She told me that many times."

Marks' claims were disputed by Kaelin's attorney, Michael Plotkin, who said his client testified truthfully in every way during six days on the stand last month.