Denmark crashed out of the FIFA Women's World Cup and Brazil advanced as Group D winners after Pretinha's injury-time goal settled a thrilling contest in Hangzhou.

The partisan 40,000-plus crowd certainly did not go home disappointed after roaring Marta and Co to a victory that ensured China went through as runners-up, edging out a Denmark side who held out bravely for the bulk of this pulsating encounter.

The Danes had promised to go on the offensive against the naturally attack-minded Brazilians and they certainly began the match on the front foot, Maiken Pape sneaking in between two defenders for force a fine save from Andreia after just nine minutes. Brazil, however, soon took control and a minute after Daniela had sent a shot fizzing wide of the far post on the half-hour mark, Marta burst through in the left channel to strike the near post.

Nerves were beginning to fray when Andreia was called upon to make another fine save to tip away Katrine Pederson's goal-bound free-kick just after the restart, but with the seconds ticking down to full-time, Pretinha burst through to lob Heidi Johansen and spark delirious scenes in the stands of the Dragon Stadium.

Player of the Match: Daniela (BRA)