Spain beat Morocco 2-0 in their final Group H match at the Under-17 World Cup in Qatar, but both teams advanced to the next round.
The result confirmed Spain as group winners with nine points from three matches, while Morocco finished second on four points.
Ibrahima Tunkara opened the scoring for Spain in the 17th minute before Guillermo Trojano doubled their advantage in the 61st minute.
Spain had already secured impressive victories over China and Fiji, beating China 5-0 in their opening game before recording a 15-0 win against Fiji.
Those results ensured Spain maintained a perfect record and finished at the top of the group.
Morocco began their campaign with a 6-0 victory over Fiji, then drew 2-2 with China before facing Spain in their final group fixture.
In the other match, China defeated Fiji 8-0 to finish third with four points. They were level with Morocco but ended below them on goal difference.
Fiji finished bottom of the group without a point.
