LOS ANGELES, FEB. 16 -- More than 4,000 people gathered at the Shrine Auditorium yesterday to memorialize the Rev. James Cleveland, probably the foremost gospel musician of his day.

Fans, friends and former students were lined up for two blocks outside the mammoth auditorium four hours before the funeral began. Young and old, they were exquisitely dressed, the women in hats that matched their outfits, all paying tribute to a man known as a singer, composer, arranger, pianist and preacher.

Once inside, they clapped and swayed to the several hundred gospel voices on stage. Some in the audience brought their own tambourines. Although there were short speeches of praise and farewell to Cleveland, 59, who died Feb. 9 of a heart ailment, this funeral was mainly an exultation of voices. It was a tribute to a man whose musical legacy was so powerful that it brought to the funeral people who never knew Cleveland personally, even people who never owned his records.

"I just heard him on the radio," said Ora Bostic, who waited in line for a seat in the auditorium. "I just feel blessed about him."

Some in attendance were music stars like Gladys Knight, who sat quietly through the service in a white suit. "He was a confidant," Knight said, "a spiritual connection."

Cleveland was a mentor for numerous singers -- perhaps the most famous being Aretha Franklin, whom he taught to sing gospel when she was 9 -- and some of them came yesterday to pay their respects. Pop singer Stephanie Mills and gospel singers Andrae Crouch and the Hawkins Family were in the crowd and superstar Stevie Wonder sang, "Without a Song," a church favorite Cleveland once recorded.

"A lot of people didn't know they could sing before James Cleveland came along," said gospel singer Shirley Caesar on stage. "Don't let anybody tell you don't cry," said Caesar in a strong yet mournful voice. "I say cry."

Cleveland grew up on the south side of Chicago, steeped in the gospel music of Mahalia Jackson and other great gospel voices. He began singing as a boy and never stopped. The winner of three Grammy Awards, composer of more than 400 gospel songs and recipient of 16 gold records, Cleveland was the first gospel singer to be immortalized with a gold star on Hollywood's Walk of Fame.

Cleveland is credited with reintroducing the choir to contemporary gospel music. He considered his greatest accomplishment the formation in 1968 of the Gospel Music Workshop of America. Headquartered in Detroit, it now boasts 20,000 members, and a few hundred from the Northern and Southern California chapters sang on stage. They were joined by the choir of the Cornerstone Institutional Baptist Church here, where Cleveland was the founding pastor.

Cleveland never forgot he was a minister. "He was known as a singer," the Rev. William Turner, pastor of New Revelation Baptist Church in Pasadena, told the crowd. "But I knew him as a pastor. He was often quoted saying, 'Singing is my inspiration, but preaching is my call.' "

Turner also remembered that when Cleveland was asked what brought him pain, he answered, "To see people who sing loud and live low."

Pastor Edward V. Hill of Mt. Zion Baptist Church here remembered his friend Cleveland as a man who stayed humble and down-to-earth despite his enormous success. "James testified," Hill said, his voice rising, "that out of everyone he had seen, every place he had gone, James testified that Jesus was the best thing. Not the Grammy awards, not the Cornerstone Church. Jesus was the best thing that ever happened to him."

The cavernous auditorium was an unusual location for a funeral, but Cornerstone officials had feared their church would be too small for the expected crowd. Cleveland's body, clothed in white ministerial robes, lay on a red velvet bier in front of the stage, which was lined with thick bouquets of flowers. As church staff members stood guard, mourners were invited to pay their last respects.

Cleveland was to be buried at the Inglewood Park Cemetery here.