The boy accusing Michael Jackson of molesting him has testified he slept in the US singer's bedroom where they watched internet pornography together.
Jackson's lawyers have been trying to undermine damaging claims
Gavin Arvizo, 15, came face-to-face with the singer for the first time in court, as he took the witness stand.
The boy told the court that he once considered Mr Jackson his "best friend" and "the coolest guy in the world".
Mr Jackson denies 10 charges including child abuse and false imprisonment. He could face a 21-year prison sentence.
Gavin, a cancer patient when he met Mr Jackson, looked unimpressed as he identified the singer across the court room in Santa Maria, California.
Mr Jackson, dressed in a black suit and tie, looked on impassively as the witness spoke about the background to the case.
The boy said the singer had suggested that he spend the night at his Neverland Ranch, and that his parents had agreed.
He went on to testify that they had looked at seven sexually explicit websites in the bedroom over a 15-30 minute period on the second night.
Gavin also told the court that after a few of his visits Mr Jackson had suddenly become distant and stopped returning his calls for a while.
But he then called him out of the blue and asked him to take part in the filming of an episode used in the television documentary aired in 2003 that sparked the investigation.
Fans of Mr Jackson waved as he left the courtroom
In the video, Mr Jackson is seen holding hands with Gavin and nuzzling the boy.
"[Jackson] was like, "I'm going to put you in the movies and this is your audition,'" Gavin told the court.
"And he said: 'Tell them you call me daddy and daddy Michael.'
"He said he wanted me to say that he pretty much cured me of cancer."
Asked if this was true, he said: "Not really. He was hardly there during my cancer."
Later he described how he felt when he was ill.
"I felt like there was a knife in my stomach," he said, adding he would clutch a pillow to his stomach to lessen the pain.
The BBC's Michael Buchanan in Santa Maria says that the strength of Gavin's testimony and his credibility as a witness will have a crucial impact on the trial's outcome.
Gavin is expected later to recount the occasions on which he says he was abused by Michael Jackson, in February and March 2003. He returns to the witness box on Thursday.
Earlier on Wednesday, Star Arvizo - the only witness to the alleged abuse and Gavin's younger brother - testified in court for a third day.
He said he saw the singer twice molest Gavin at the Neverland ranch.
Mr Jackson's lawyer, Thomas Mesereau, produced a transcript of an interview 14-year-old Star Arvizo gave to police and asked him if his account of the alleged second molestation had changed.
"It was actually three times," the boy said. "I was nervous when I did the interview."
Mr Mesereau asked him if "because you were nervous, you didn't get the facts right?"
"Yes," replied Star Arvizo.
Mr Mesereau also suggested the Arvizo family were not held against their will at the ranch for nearly a month in 2003, as they claim.
"How many times do you think your family escaped from Neverland and then went back so they could escape again?" he asked
"I don't get the question," the boy said.
Star Arvizo later said he only considered the third departure from Neverland to be an escape.
It has emerged that Mr Jackson has asked the judge to allow jurors to visit Neverland.
"Based on the fact that the prosecution will make an issue of the nature of Neverland... it is proper for the jury to be allowed to view Neverland," his lawyer said.