Twice former winners Germany were sent crashing out in the opening phase of the women's World Cup for the first time after being held to a shock 1-1 draw by South Korea in their final Group H game in Brisbane.
The Germans, champions in 2003 and 2007 and ranked second in the world, had needed a win to be sure of progressing and Morocco's 1-0 win over Colombia in the other group match in Perth sent both teams through to the last 16.
The Koreans took a surprise early lead when Cho So-hyun netted in the sixth minute, while Alexandra Popp equalised with a trademark header three minutes before the interval.
However, Germany were unable to find the winner needed to advance.
"It's obvious this was not ideal, I think we are all aware of that," said Popp. "You have seen it and it is really difficult for me right now to give you some indepth analysis.
"During the second half we were informed that we needed urgently to score and after that I think we have shown strong desire, the grit to go for goal but somehow it just didn't want to go there."
Debutants Morocco reached the last 16 at the first attempt.
The 72nd ranked Moroccans scored through Anissa Lahmari's toepoke after a saved penalty at the end of the first half.
The Moroccan players and coaches huddled together on the pitch waiting for confirmation of the result from Brisbane, exploding in delight when word came through that the final whistle had been blown at Lang Park.
"The game this evening was fantastic. It was fantastic for lots of different reasons. I would even say that it is the prize for the talent of this team," winning coach Reynald Pedros told reporters.
"We'll do everything we can to go to the next stage. Our objective is not to stop now, we need to go further."
In the last 16 Colombia play Jamaica and Morocco play France.
-Reuters