FIFA's executive committee chose South Africa to host the 32-team finals ahead of Morocco and Egypt.
Tunisia's decision to withdraw in the final day of campaigning reduced the field to four on Friday. The field dropped to three on Saturday when FIFA excluded Libya from the vote because it did not meet "all relevant conditions."
"We can all applaud Africa," FIFA resident Sepp Blatter said in making the announcement.
"The victor is football. The victor is Africa."
The World Cup is the biggest sporting event outside the Summer Olympics and soccer the world's most popular sport.
Almost four years ago Germany controversially won the race to host the 2006 finals by a single vote after Oceania delegate Charles Dempsey defied orders to vote for South Africa.
Although it is going to be the first time the soccer World Cup finals will be held on the continent, South Africa has hosted the 1995 Rugby World Cup and the 2003 Cricket World Cup.
"We can all applaud Africa...The victor is football. The victor is Africa"
Former president Nelson Mandela said last week hosting the 2010 World Cup finals would be a perfect gift for the country as it celebrates 10 years of democracy.
He said it would add three billion rand ($423 million) to the economy and create more than 150,000 jobs in a country where unemployment is more than 30% and poverty is rife.
South Africa sent a high-profile mission to Switzerland, led by Mandela, President Thabo Mbeki and Nobel Peace prize winner Archbishop Desmond Tutu, and was the slight favourite.
The country's hopes of success were boosted at the start of the month after FIFA inspectors rated its facilities as the best of five competing countries.
The country celebrated 10 years
of democracy in April
South Africa's attempt was described as "excellent", while those of north African rivals Egypt and Morocco were "very good".
Morocco suffered a major blow by having questions raised about the country's lack of infrastructure.
Libya, whose hopes of co-hosting the finals with Tunisia had been repeatedly slapped down by Blatter, was taken out of the running by FIFA on Saturday before voting even began.
FIFA's technical evaluation report said Africa was prepared to host the finals, but would need support in stadium plans, pitch quality, ticketing, budgeting and general planning.
The inspectors said South Africa had excellent overall infrastructure and a clear and stable bid project.
"Despite questions about security in the country, the legacy compared to the investment needed will be a great contribution to the country," the inspectors reported.
The World Cup finals, held in Asia for the first time when South Korea and Japan co-hosted the 2002 tournament, will be awarded to South America in 2014, with Brazil expected to land the finals when it celebrates its federation's centenary.