Brazil booked a Confederations Cup semi-final date against hosts Germany despite being held to a 2-2 draw by Japan in a match scarred by another pitch incursion here on Wednesday.
Robinho and Ronaldinho, wearing the captain's armband, scored Brazil's goals with second half substitute Masashi Oguro getting a second half equaliser after Shunsuke Nakamura's first half effort.
The result left the sides tied on four points in Group B, with Brazil's better goal difference earning them the right to meet Germany in Nuremberg on Saturday.
There was a touching scene before kick-off when Ronaldinho, Kaka and Juan came up and hugged Zico, followed by the Brazil team doctor who used to look after the 1980s Brazil superstar in his playing days for Flamengo.
Carlos Alberto Parreira kept his word and made four changes to the side - introducing Marcos in goal and a new backline of Bayer Leverkusen's Juan and Leo to replace Dida, Roque Junior and Gilberto, with Arsenal's Gilberto Silva coming on for Emerson in midfield.
Japanese Hidetoshi Nakata(R) is challenged by Brazil's Ze Roberto during their 2005 FIFA Confederations Cup clash in Cologne. The two teams tied 2-2
Japanese Hidetoshi Nakata(R) is challenged by Brazil's Ze Roberto during their 2005 FIFA Confederations Cup clash in Cologne. The two teams tied 2-2
Zico kept faith with strikers Keji Tamada and Atsushi Yanagisawa despite the duo misfiring badly against Greece.
In a frenetic start Brazil could have been a goal down in the fourth minute when Akira Kaji's shot slipped under Marcos only for the FC Tokyo defender to be ruled offside.
But it was the five time world champions who took the lead in the tenth minute with a fine moment of artistry from Ronaldinho, who escaped Kaji's attentions and ran half the length of the pitch to feed Robinho who had brilliantly slipped his marker, the 21-year-old striker angling his shot from the left past Yoshikatsu Kawaguchi.
Only Kawaguchi's right post prevented Japan going further behind when a Kaka rocket ricocheted off it soon after.
The crossbar at the other end was responsible for denying a header from Kaji off Mitsuo Ogasawura's freekick as the Asian champions' pace began to nettle the Brazilians.
Then on 27 minutes they got a deserved equaliser with Marcos only getting his fingertips to Nakamura's shot after an attack which had its origins in a Hidetoshi Nakata-taken freekick.
Japanese national team coach Brazilian Zico(L) reacts from the sideline during the 2005 FIFA Confederations Cup clash opposing Japan and Brazil in Cologne. The two teams tied 2-2
Japanese national team coach Brazilian Zico(L) reacts from the sideline during the 2005 FIFA Confederations Cup clash opposing Japan and Brazil in Cologne. The two teams tied 2-2
Ronaldinho restored Brazil's supremacy when Robinho crossed from the left for the Barcelona star to slide the ball in from in front of goal in the 32nd minute.
The second half was barely born when Nakamura had his head in his hands after a point-blank effort saved by Marcos - up at the other end only Kawaguchi's bravery kept the ball from going in when the former Portsmouth keeper took the full force of Juan's shot in his face.
Adriano, having an off day, made way for Julio Baptista with Kaka replaced by Baptista's Seville teammate Renato on the hour mark and shortly after there was another new face on the pitch belonging to the Brazilian fan who breached the tight security cordon.
He ran up to Ronaldinho before jumping into the Japan goal's netting, five security guards in hot pursuit in the third incident of this nature at the 2005 Confed Cup which will give organisers cause for concern ahead of next year's World Cup.
Japan had the last word when Oguro repeated his feat against Greece and scored the late leveller.