Substitute Maicon scored twice in the dying minutes as Brazil came from behind to beat Germany 2-1 at Cairo Stadium and reach the U-20 World Cup semi-final on Saturday.
Lewis Holtby put Germany in front on 73 minutes when he headed home a cross from Semih Aydilek.
Maicon leveled the score two minutes from time with a low shot that beat Germany keeper Ron-Robert Zieler at the near post.
The 19-year-old striker, who plays for Brazilian side Fluminense, notched the winner in stoppage time when he ghosted behind the defense to meet a long ball with a looping shot over Zieler.
"We wasted many opportunities but the players still kept their composure to claim a valuable win," Brazil coach Rogerio Lourenco told the post-match press conference.
Brazil, who won the tournament four times, will face the winners of Saturday's other game between UAE and Costa Rica.
نرشح لكم
دياب يكشف لـ في الجول حقيقة نقل مباريات الدوري إلى النهار
قائمة الأهلي - عودة إمام عاشور وحسين الشحات أمام مازيمبي
غياب في توقيت حرج.. رابطة الأندية تعلن عقوبة رمضان صبحي
خبر في الجول - بعد 3 أشهر من الغياب.. إيهاب جلال يعيد باسم مرسي لتدريبات الإسماعيلي
مران الأهلي - فقرات خططية وتقسيمة قوية تحضيرا لمواجهة مازيمبي
الأهلي يرتدي زيه التقليدي أمام مازيمبي
دوري المحترفين - تأهل كهرباء الإسماعيلية للمرة الثانية.. وموقعة فاصلة ضد السويس
لاعب مازيمبي: شعرنا بالإحباط بعد التعادل أمام الأهلي.. ومباراة العودة فرصة تاريخية