By Piers Edwards
BBC Sport in Atteridgeville, South Africa
South African striker Katlego Mphela scored his sixth goal in five games
Hosts South Africa took their unbeaten run to 12 matches as they finalised their World Cup preparations, defeating Denmark 1-0 in Atteridgeville.
Just six days before they open against Mexico in Group A, the red-hot Katlego Mphela settled a tight game late on.
Fourteen minutes from time, the striker burst onto a delightful through ball from Reneilwe Letsholonyane to drill low under the body of Stephan Andersen.
It was the South African forward's sixth goal in five internationals.
"This was a special result for us as it was a victory against a very good team," said Brazil coach Carlos Alberto Parreira.
"We played with confidence and personality, and this shows we are ready for the World Cup."
While the win will delight a nation, World Cup organisers may be concerned about the locals' continued habit to arrive late for matches.
Despite repeated calls to change this, the stadium was less than half full early on but eventually neared its 29,000-capacity as the stands became a sea of yellow.
Apart from the thousands of vuvuzelas, it was a fairly quiet affair until just before the half-hour mark, when Teko Modise failed to guide his header on target after a fine move.
Though rarely threatening, Denmark instantly replied as Daniel Agger's header from Jakon Poulsen's free-kick bounced off the crossbar.
Despite enjoying good possession, South Africa struggled to break the Danes down with Modise going close with a curling 20-yarder from the edge of the area.
Shortly after half-time, Aaron Mokoena wasted a free header at the back post before Letsholonyane stung the fingers of Andersen with a 25-yard drive.
Denmark didn't threaten until the 61st minute when South African keeper Itumeleng Khune, starting after recovering from injury, was alert to stop Thomas Enevoldsen's deflected effort.
Just moments after testing Andersen from eight yards, Mphela finally forced the breakthrough when drilling home a low angled shot from the same distance.
The Europeans, who will contest Group E in South Africa alongside Cameroon, Japan and the Netherlands, came back through Enevoldsen who fired wide after Khune flapped at a cross.
But the goalkeeper, whose reserve Moeneeb Josephs had shone in his injury-enforced absence, redeemed himself when smartly denying Mikkel Beckmann's crisp volley in stoppage time.
At the end, the World Cup hosts departed to rapturous applause from fans who will next see them kick off the World Cup on Friday at Soccer City.
After facing Mexico, Bafana Bafana take on Uruguay in Pretoria on 16 June and France in Bloemfontein six days later.