PRETORIA - Brazil knocked world champions Italy out of the Confederations Cup with three quick goals just before halftime to earn a 3-0 victory on Sunday. Strikes from Luis Fabiano after 37 and 43 minutes and an own goal from Andrea Dossena just before the interval left the holders top of Group B and set up a semi-final against hosts South Africa in Johannesburg on Thursday. But the fate of Italy hung in the balance until the dying moments as it depended on the result of the match between Egypt and the United States in Rustenburg. The U.S., who started the night bottom of the group with no points after two straight defeats, qualified ahead of Italy and Egypt on goal difference following a shock 3-0 win. The defeat completed a miserable tournament for Marcello Lippi's men who were also beaten by Egypt and finished in third place. It was also a bittersweet night for captain Fabio Cannavaro who equalled Paolo Maldini's record of 126 appearances for his country but was helpless to stop Italy conceeding three goals in the first half of an international for the first time since 1957 when they lost 6-1 to Yugoslavia. Only goalkeeper Gianluigi Buffon and the woodwork stopped them conceding as many to the Brazilians who head into the last four having scored 10 goals in three group matches. NO SURPRISE It was no real surprise when Brazil went ahead after 37 minutes. Luis Fabiano scored with a shot on the turn which left Buffon floundering and he doubled the advantage after a brilliant move between Robinho and Kaka. Robinho let the return pass roll past him, Daniele De Rossi committed himsel and left Luis Fabiano with time to chip the ball over Buffon. Worse was to come for the world champions as another driving run from Robinho forced the unfortunate Dossena to turn the ball past Buffon and send the Brazilians into raptures. Brazil could have been 5-0 up at halftime after hitting the woodwork twice through Ramires and a deflection off De Rossi. Brazil eased off in the second half as Italy looked for the goal that would have prevented their exit, but Brazilian keeper Julio Cesar made fine saves to thwart them. It was Brazil's second win over Italy this year after beating them 2-0 in London, leaving the world champions searching for their first win over their old rivals since Paolo Rossi's hat-trick gave them a 3-2 victory at the 1982 World Cup.