Luis Enrique's side only qualified from Group E by the skin of their teeth after a 2-1 loss to Japan, who leapfrogged La Roja into first place, but they still bested Germany on goal difference to go through as runners-up.
The 2010 champions had put seven past Costa Rica before also being held to a draw by the Germans in the group phase, but they will still be regarded by many as the favourites to get the job done this week.
Here, Sports Mole takes a look at three reasons for La Roja to be confident of besting Morocco and advancing to the quarter-finals.
Strong head-to-head record
Morocco and Spain will be locking horns for the fourth time at the Education City Stadium, and all three of their previous meetings - which Spain are unbeaten in - have been in a World Cup context.
The two sides faced off in the CAF-UEFA World Cup qualifying playoff round for the 1962 edition over two legs, the first of which saw Spain pick up a 1-0 win in Casablanca before returning to the Bernabeu for the second leg.
The return fixture was equally tight, but Spain - led by the legendary Alfredo Di Stefano - ran out 3-2 victors to advance to the finals, and they would renew hostilities with Morocco in the 2018 group stage.
Strikes from Khalid Boutaib and Youssef En-Nesyri cancelled out Isco's opener in Russia four years ago, but Iago Aspas came up with an injury-time leveller for La Roja to keep their unbeaten streak against the Atlas Lions going.
Goal machines
Seven of Spain's nine goals in the group stage came in their demolition of Costa Rica - the less said about their attacking acumen against Germany and Japan the better - but they still qualified for the last 16 as the joint-highest scorers in Qatar.
Only England also managed to rack up a total of nine goals in their three group games, and since being held to a 0-0 draw by Sweden at Euro 2020, finding the back of the net has been Spain's forte for 18 months now.
Enrique's side have remarkably scored at least one goal in each of their last 24 matches in all tournaments, and their star striker Alvaro Morata - who has three goals and one assist from three matches at the World Cup - has evidently brought his best shooting boots to Qatar.
The Atletico Madrid man only managed 126 minutes of football across Spain's three group stage matches, but he scored in every one and could now become only the second Spanish men's player to score in four successive World Cup matches after David Villa in 2010.
Villa's boots are particularly big ones to fill for Morata, but he will be blessed with adequate support in his quest for history, as Dani Olmo, Ferran Torres, Gavi, Carlos Soler and Marco Asensio have also made the net ripple for La Roja in the current tournament.
Pass masters
A staggering 2,489 passes were completed between Spain's players across their three group games, which is the highest tally for La Roja since 1966 - not even the famed tiki-taka winners of 2010 achieved that many up to this point.
Barcelona manager Xavi has favoured a midfield trident of Gavi, Pedri and Sergio Busquets - two Kopa Trophy winners and a wily veteran - and Enrique has also placed his faith in the trio, whose connection at club level is paying dividends for the national team.
Of course, retaining the ball for long periods means very little unless the goals flow, and Spain learned that the hard way against Japan, posting 82.3% possession and stringing together 969 passes but still falling to a 2-1 defeat.
However, both statistics were World Cup records for a losing side, and with their incredible 24-match goal streak still alive, Spain can always expect to carve out a chance or two against a deep-lying Moroccan outfit.
Read more on Morocco vs Spain
Click here to read our full preview for Morocco vs Spain
How Morocco could line up against Spain
How Spain could line up against Morocco
World Cup 2022: Morocco vs. Spain head-to-head record