Late goals by Abdelhamid Sabiri and Zakaria Aboukhlal ensured that Morocco beat Belgium two-nil to record the latest shock at a World Cup that has been full of surprises so far.
Belgium goalkeeper Thibaut Courtois was at fault for the first goal, inexplicably allowing Sabiri’s in-swinging free-kick to beat him at his near post with 17 minutes to go.
But the whole Belgium side paid the price for a ponderous performance, with Morocco capping a magnificent second-half display when Aboukhlal fired Hakim Ziyech’s cutback into the roof of the net in stoppage time.
That sparked wild celebrations in the stands of Al Thumama Stadium from thousands of Morocco fans, who had created a raucous atmosphere from the start.
The result means Morocco move above Belgium to the top of Group F on four points, with Croatia and Canada meeting later on Sunday (16:00 GMT kick-off).
Few surprises had seemed on the cards early on. After surviving a high-tempo and helter-skelter approach from Canada – their first opponents in Group F – Belgium’s initial job this time was to break down Morocco’s massed defence.
They managed it within the first five minutes when Thorgan Hazard sent Michy Batshuayi running clear, but he was denied by Munir Mohamedi, a late replacement in the Morocco goal after Bono was taken ill in the warm-up.
It seemed that would just be the start of some sustained Belgium pressure, but while they continued to dominate possession, further clear-cut chances were few and far between.
Roared on by their noisy fans, who were bouncing all around Al Thumama Stadium in great numbers, Morocco comfortably kept them at bay and began to grow into the game themselves.
They thought they had taken the lead just before half-time when Ziyech’s free-kick eluded Courtois. Still, the video assistant referee (VAR) showed Romain Saiss was offside and deemed to be interfering with play after running across the Belgium goalkeeper’s line of sight.
Roberto Martinez’s side did not improve after the break, only managing shots from distance from the ineffective Eden Hazard and substitute Dries Mertens.
Morocco, meanwhile, were becoming as lively as their supporters in the stands and went close to taking the lead when Sofiane Boufal cut in from the left and sent a shot bouncing wide.
They kept coming forward and got their reward when Sabiri’s clever free-kick found Courtois dozing at a set piece again. This time, there was to be no VAR reprieve to save him.
The closest Belgium came to an equaliser was when Jan Vertonghen headed wide before Aboukhlal made sure of a stunning victory by finishing off a swift break.
Niclas Fullkrug gave Germany a precious point against Spain as they fight for World Cup survival.
Germany’s hopes of reaching the knockout phase had been given an unlikely lifeline earlier on Sunday when Costa Rica beat Japan when any other result would have meant defeat by Spain would send them out.
Hansi Flick’s side still need to beat Costa Rica in their final Group E game and hope Japan do not spring a shock against Spain but at least they know their hopes of moving into the last 16 are intact after falling behind at Al Bayt Stadium.
Spain, who almost went ahead in the first half when keeper Manuel Neuer turned Dani Olmo’s shot on to the bar, took the lead after 62 minutes when substitute Alvaro Morata applied a brilliant near-post flick to Jordi Alba’s cross.
Germany pressed forward and Fullkrug gave them a point seven minutes from the end when he burst through and lashed an unstoppable finish high past Spain keeper Unai Simon.
Leroy Sane almost won it for Germany in the dying seconds but ran out of space as he raced through on goal and the ball was scrambled clear.
Croatia came from behind to knock Canada out of the World Cup with a 4-1 victory in their Group F clash.
Alphonso Davies opened the scoring for Canada after just two minutes – with their first-ever World Cup goal at the fifth attempt – but two goals from Andrej Kramaric either side of a Marko Livaja effort turned the game on its head. Substitute Lovro Majer then added a late fourth.