Nelson Mandela enjoyed a rapturous reception from fans at the World Cup final tonight as he attended the closing ceremony.

A thunderous mix of vuvuzelas and roars from the crowd greeted the former South African president as he was driven across the pitch in a golf cart with his wife Graça Machel.

The anti-apartheid icon had kept a low profile during the tournament, having cancelled plans to attend the opening ceremony after his great-granddaughter died in a car crash the night before.

The Nobel laureate shook hands with officials before leaving the field a few minutes later.

Heads of state, including South Africa's Jacob Zuma and Zimbabwe's Robert Mugabe, have attended the match, which sees European champions Spain take on Holland. Other VIPs in attendance include Archbishop Desmond Tutu, former UN secretary general Kofi Annan, supermodel Naomi Campbell and Oscar-winning actor Morgan Freeman.

Shakira, backed by South African Afro-fusion band Freshlyground, did one last rendition of the cup's theme tune, Waka Waka (This Time for Africa) after a lights show and fireworks.

Dancers wearing the colours of the 32 competing nations performed before a backdrop of pictures of stars and fans beamed on to the pitch. Others, dressed in white elephant costumes, made their way on to the field toward a large image of a watering hole.

Themes included pantsula and gumboot dancing and local jazz, all touchstones of South African music.

Some had doubted South Africa's ability to stage a successful tournament, but the matches have been played before mostly capacity and joyous crowds. The competition, the first to be held in Africa, has been free of any major incidents.