Singer Michael Jackson has pleaded not guilty in court in the United States to charges of child abuse.
Jackson gestured from the roof of his car in a final piece of theatre
The singer faces seven abuse charges and two of plying a child with alcohol. He has described them as a "big lie".
The pop superstar was surrounded by cheering fans as he left the courtroom after the initial hearing in Santa Maria, California.
"I love my fans," he shouted to reporters as his bodyguards guided him through the crowd.
Finally he stood on the roof of his car waving at supporters, blowing them kisses and flashing peace signs, before being driven away.
Earlier, the actual court proceedings had been a more subdued affair.
Mr Jackson, 45, was told off by the judge for arriving in court 21 minutes late.
He emerged from a people carrier at about 0835 local time (1635 GMT) to cheers and screams from fans who lined the route to court.
Superior Court Judge Rodney S Melville told the singer he should not have been late: "Mr Jackson, you have started out on the wrong foot here...
Mr Jackson was frisked on entering the court
"I want to advise you that I will not put up with that. It's an insult to the court."
The judge set a first pre-trial hearing date for 13 February which will determine if the star's case goes to trial.
If the trial takes place - which would not be for several months - and Mr Jackson is found guilty, he could face 22 years in jail.
The BBC's Robert Nisbet at the court house said there was three times as much media interest as there was for the OJ Simpson murder trial nine years ago.
More than 1,000 spectators were waiting to see the singer. Fans called on Mr Jackson to "stay strong" and waved placards and banners.
Mr Jackson's father, Joe, arrived at court on time
Surrounded by bodyguards believed to be from the Nation of Islam, Jackson's car was swarmed by hundreds of waiting press as he arrived.
He walked the 50 metres towards the court building, shaking hands with fans as he went.
Joe Jackson, the singer's father, had arrived at the court about 25 minutes earlier. His mother, Katherine, also arrived in a limousine, alongside other family members and the singer's legal team.
Mr Jackson is on $3m (£1.6m) bail and has called the charges "monstrous" and "anchored in the most vicious allegation imaginable".
He has been charged with seven counts of child molestation and two counts of administering intoxicating liquor to a minor with the intent of committing a crime.
Mr Jackson is being represented in court by Mark Geragos and another high-profile lawyer, Benjamin Brafman, who has previously represented rapper Sean "P Diddy" Combs.
The investigation into Mr Jackson first became public when police raided Neverland on 18 November.
Security was tight for the hearing
He handed himself over to police to be arrested two days later, and was formally charged on 18 December.
The charges accuse Mr Jackson of molesting a boy, who is identified in court papers only as "John Doe", between 7 February and 10 March 2003.
They include a "special allegation" of "substantial sexual conduct" - of which a conviction would make Mr Jackson ineligible for parole.