Nelson Mandela, left, and his wife Graca Machel arrive at Soccer City Stadium for Sunday's closing ceremony. ((Luca Bruno/Associated Press))

Nelson Mandela waved to the crowd at Johannesburg's Soccer City as South Africa bid farewell to the 2010 World Cup on Sunday in an emotional and joyous ceremony.

The anti-apartheid icon had kept a low profile during the month-long tournament, having decided against attending the opening game following the death of his great-granddaughter in a traffic accident after the World Cup concert.

Driven in a small golf cart and seated alongside his wife Grace Machel, the smiling, 91-year-old Mandela was welcomed by a thunderous mix of vuvuzelas and roars from the crowd. He shook hands with officials before leaving the field a few minutes later.

Earlier, Shakira performed Waka Waka (This Time for Africa), the competition's official song.

Spain won its first World Cup title, defeating the Netherlands 1-0 on AndrĂ©s Iniesta's goal late in extra time.

With files from CBC Sports