(CNN) -- They were there for Michael Jackson.
Crowds rushed into the memorial service before it started and walked slowly out when it ended.
They were celebrities. Motown founder Berry Gordy came. So did singer and songwriter Smokey Robinson. Diana Ross sent her wishes, as did Nelson Mandela.
They were fans -- two girls from Canada who were given their tickets by a complete stranger. A pair of men who wanted to fulfill a Mexican tradition by distributing memorial ribbons. A woman who wore a dress laden with Jackson buttons.
They cheered as his golden casket was wheeled out to a brightly lit spot below center stage. They cried as Lionel Richie sang "Jesus Is Love."
And when Gordy called him "the greatest entertainer who ever lived," they rose for a standing ovation. Photos: Stars honor Michael Jackson »
The people came to say goodbye to Michael Jackson.
At Los Angeles' Staples Center on Tuesday, fans gathered by the thousands for the memorial service.
Some had received one of the 17,000 "golden tickets," the free passes given away after an online lottery for which 1.6 million people registered. Go inside the memorial service »
Others came ticketless, simply to be a part of the tribute to the "King of Pop," who died June 25 just before a planned series of concerts titled "This Is It."
The atmosphere was peaceful, almost festive. Police had ringed a perimeter around the center and adjacent Nokia Theatre with barricades, but crowds were lighter than expected -- perhaps because authorities appealed to people to watch the event on TV at home.
The mood was buoyant among groups of eager mourners who gathered around cell phones to watch mobile video of the event.
One ticketless fan, Deonerae Minter, said he showed up to get a glimpse of the funeral procession and to be a part of the event "instead of just watching it on TV."
Chu Nguyen and Eriko Nakayama both came dressed in black in honor of the occasion.
"It's for him, just to be respectful," said Nguyen of his black suit and tie.
"We feel like it's a real privilege for us to be here," Nakayama said.
A young girl, clearly born long after Jackson's 1980s "Thriller" album, sported the singer's trademark sequined glove, sunglasses and a gray hat.
Inside the Staples Center, the audience responded to the memorial service's rich, spiritual atmosphere. One man raised his hand during Richie's performance of "Jesus Is Love," as if he were in church. A woman, who said she had traveled from France, shouted, "Michael, j'taime" -- "Michael, I love you." Another person yelled, "long live the king."
Some raised their voices: Crowds outside the Staples Center yelled "Michael Jackson! Michael Jackson!"
Some hushed them: Many gasped in heartbreak when Usher, after performing the Jackson song "Gone Too Soon," knelt to pay his respects to Katherine Jackson, the entertainer's mother, and the family.
Some let their music do the talking -- Stevie Wonder performed "Never Dreamed You'd Leave in Summer," while John Mayer did an alternately gentle, alternately soaring "Human Nature." Others offered humble stretches of silence as Jackson's picture was shown on a giant screen above the stage.
Just before the event's conclusion, Kenny Ortega, director of Jackson's "This Is It" concerts, said it was only fitting to have the service at the Staples Center, where Jackson had been rehearsing for the London shows.
"We knew we had to invite the world to join us here in Michael's house," he said.
And the world was there.
CNN's Jacque Wilson, Paul Chase and Thom Patterson contributed to this report.