Germany twice came from behind to knock China out of the FIFA World Youth Championship Netherlands 2005 as a late goal by defender Marvin Matip proved decisive in Tilburg.
Defeat was harsh on the battling China team who seemed to hold the upper hand for sustained periods and German coach Michael Skibbe said: "I would like to congratulate everybody who played. Both teams put on an exciting under 20 match and I think every player was at his limit.
"I'm particularly happy that we won in the last minute and we are able to preserve our energies for the quarter-final by not having to play extra-time."
The vivid red of China dominated the Willem II Stadium, with their fans providing colourful and noisy support throughout a match which ebbed and flowed like knockout football should.
China made an incredible start thanks to the attacking instincts of midfielder Chen Tao, who played a prominent part in the early proceedings. His darting run at the German defence saw him brought down on the edge of the box, a challenge that earned Marcel Schuon a yellow card. From the resulting free-kick, Chen Tao curled the ball over the wall and left goalkeeper Rene Adler rooted helplessly to his line (1:0, 4').
China's joy was short-lived as Germany immediately went on the offensive and when Chinese goalkeeper Yang Cheng spilled a routine cross from Michael Delura, Christian Gentner was on hand to pick up the pieces and slide home the equaliser within a minute (1:1, 5').
Yang was more alert to the threat posed by Marcell Jansen soon afterwards, diving to save with his feet as the Borussia Moenchengladbach midfielder was poised to strike.
China restored their lead in the courtesy of a penalty. Schuon, already on a caution, also played a part in the second Chinese goal as his ill-timed challenge sent Gao Lin sprawling in the area and Chen made no mistake from the spot, though Adler managed to get a hand to it (2:1, 20').
Flat-footed defence made to pay
Once more China failed to hold onto their lead though and their defence was caught flat-footed, waiting for an offside flag that never came when Nicky Adler chased onto a hopeful ball over the top by Christoph Janker and then steadied himself well before clipping in from an acute angle (2:2, 30').
China's Zheng Tao came closest to scoring after the interval, but was so glad he didn't when he saw his attempted clearance slice horribly off his boot and towards his own goal before passing harmlessly over the bar.
Generally speaking, China posed the greater threat moving forward though, with Lu Lin's pace in particular proving troublesome for the German defence. Lu set up Zhao Xuri to test German keeper Adler, who managed to turn the ball away for a corner.
At the other end meanwhile, Jansen broke clear and seemed set to score until Yang blocked with his legs again.
With the clock ticking down towards extra-time, Chen had a fabulous opportunity to settle matters and complete his hat-trick but he could only direct his header at Adler.
Chinese misery was compounded moments later when Germany broke free down the right and Delura's centre was glanced home by the head of Matip for the winner (2:3, 89').
Disappointed China coach Eckhard Krautzun said: "Despite our loss I am very proud of the performance. China have proved we can play football, score goals and play offensively, but we made too many mistakes in defence. Germany's diagonal balls hurt us."