Germany lost their first match at a European Championship for 20 years when they were beaten 1-0 by Norway.
Ingvild Isaksen's deflected strike in first-half injury-time was enough to beat the winners of the last five tournaments, to top Group B.
Both countries progress to the quarter-finals along with Iceland, who beat the Netherlands 1-0 thanks to Dagny Brynjarsdottir's 31st minute goal.
Germany will now face Group A runners-up Italy in the knockout stages.
Norway and Iceland must wait for Thursday's Group C games before discovering their opponents.
With qualification secure, Norway made six changes to their starting line-up and they went close early on when Emilie Haavi's long-range free-kick was pushed away by German keeper Nadine Angerer.
Norway's Ingrid Hjelmseth tipped over Saskia Bartusiak's clearance from her own half before her side took the lead when Isaksen's shot flicked off team-mate Elise Thorsnes and over Angerer.
Germany pushed for a late equaliser but Okoyino Da Mbabi and Nadine Kessler failed to hit the target from good positions.
Iceland's victory was their first ever at the Euros against a side that reached the semi-finals four years ago in Finland.
The Netherlands went close when Lieke Marten's 30-yard strike was spectacularly tipped onto the bar by Gudbjorg Gunnarsdottir.
Margret Lara Vidarsdottir could have doubled Iceland's lead but headed just wide from close range.