"For the 18 years that I was in prison on Robben Island, I was supposed to be reduced to that number," Mandela said. "Millions infected with HIV/AIDS are in danger of being reduced to mere numbers if we don't act now. They are serving a prison sentence for life."
The concert, broadcast live by the South African Broadcasting Corp.'s Africa channel and on the Internet, is part of an appeal to governments to declare a global AIDS emergency.
Between 34 million and 46 million people around the world are infected with HIV, including 5.3 million South Africans, more than in any other country. The pandemic killed more than 3 million people this year, according to UN figures.
Bob Geldof, organizer of the Live Aid concerts, which raised millions of dollars for famine victims in Ethiopia in the 1980s, said governments around the world need to make life-prolonging medicines available to all who need them.
"The condition is medical, but the solution is political, and that is why we are here today," he said.
Knowles urged the world's youth to practice safe sex and use condoms.
"There is nothing sexier than being confident and taking care of yourself," she said. "Protect yourself."
The artists, including the Corrs, Anastacia, Yusuf Islam (formerly known as Cat Stevens), and Annie Lennox, performed free.
Gabriel and the Soweto Gospel Choir stilled the crowd when they performed "Biko," a tribute to slain antiapartheid icon Steve Biko.
Brian May of Queen performed the song "46664," featuring Mandela's voice saying: "The struggle is my life. I will continue to fight."