Robinho has admitted that Brazil were wobbling in their Confederations Cup thriller with outsiders Egypt before Kaka converted the last-minute penalty that squeezed the Copa America holders home 4-3.
City team-mate Elano's first-half performance steered Brazil into a 3-1 lead at the interval but the Pharoahs stunned their opponents by snatching back two second-half goals inside a minute to send South African fans wild.
"We maybe lost our composure for a few minutes there," said Robinho, who later made way for Milan scoring sensation Alexander Pato. "But the most important thing was that we won. Egypt deserve a lot of credit for their fightback."
Midfielder Elano, being monitored by Serie A clubs, showed his usual set-piece quality with the precise free kick that allowed Luis Fabiano to put Brazil 2-1 ahead then delivered a superb corner for Juan to make it 3-1.
Elano was also replaced after 62 minutes, with the score 3-3, as Brazil coach Dunga gambled on shuffling his pack.
Dunga said: "We played two very demanding World Cup qualifiers (against Uruguay and Paraguay) before we came out here and all we did in the training sessions for the Egypt match was to try and get the players back into shape.
"We almost paid for our lack of rhythm. It wasn't easy getting those three points, and what pleased me most about the game was the fact that we kept going until the end, trying to score the winner."
After that unexpected scare in Bloemfontein, Brazil's next Group B tie is on Thursday against the USA, who found world champions Italy too strong in their opening game and succumbed 3-1.
Robinho added: "In the next game against USA we'll be working hard to make sure we don't make those errors again, because we'll be coming up against another quality team."