Nuremberg: In a repeat of the 2002 World Cup final, Brazil beat Germany in the semifinal of the Confederations Cup at Nuremberg. Two goals from Adriano and a penalty by Ronaldinho gave world champions Brazil a 3-2 win over the hosts on Saturday and a place in the Confederations Cup final. Brazil opened the scoring from a 21st-minute free kick from 25 metres. Ronaldinho squared up as if he was taking the kick but made a dummy run, allowing Adriano to crack a curling left-footed effort that took a deflection off the wall and flew past the goalkeeper. Man of the match For the big Brazil number nine, it was the second goal of the tournament. The Inter Milan striker was also declared the man of the match. Germany were level within two minutes. Sebastian Deisler's 23rd-minute corner snaked across the goal towards Lukas Podolski. The German number 20 made no mistake with a well-placed header into the corner of keeper Dida's net Two minutes from the break, the Brazilians again took off down the right flank, and when Adriano powered his way into the box, Robert Huth pushed him over inside the by-line to concede a penalty. Ronaldinho tucked away the award to restore his side's lead at 2-1 Confusion in box There was confusion in the box as both Huth and Ballack went down under challenges from Roque Junior and Emerson and referee awarded his second spot-kick of the game. For the third time in the competition, Ballack dispatched the spot-kick past Dida with a well-taken effort. The 2-2 deadlock was broken when Adriano outpaced defender Robert Huth to strike a well-placed left-foot shot wide into the far corner with 14 minutes remaining. It was the third time Brazil had got their noses in front and this time there was no coming back for Jurgen Klinsmann's side.