Spain have won one World Cup and two Euros finals since 2008, while Portugal are the reigning European champions following their victory in France two years ago.
Goal takes a look at the rundown of the Group B fixtures ahead of the June start, as well as what to expect from each team and more.
World Cup 2018 - Group B Fixtures
|June 15||Morocco 0-1 Iran||4pm UK / 11am US ET||Kazan Arena, Kazan|
|June 15||Portugal 3-3 Spain||7pm UK / 2pm US ET||Mordovia Arena, Saransk|
|June 20||Portugal 1-0 Morocco||1pm UK / 8am US ET||Luzhniki Stadium, Moscow|
|June 20||Iran 0-1 Spain||7pm UK / 2pm US ET||Kazan Arena, Kazan|
|June 25||Iran 1-1 Portugal||7pm UK / 2pm US ET||Mordovia Arena, Saransk|
|June 25||Spain 2-2 Morocco||7pm UK / 2pm US ET||Kaliningrad Stadium, Kaliningrad|
After a dire beginning to Group B, in which Iran scored a last-minute goal to win a lifeless encounter against Morocco, Portugal and Spain lit up Russia 2018 with an all-time group stage classic.
Diego Costa scored twice and Nacho once for Spain, but three goals from Cristiano Ronaldo - including a late free kick equaliser - secured a point for Portugal.
Morocco were the first team to be eliminated after Ronaldo struck again in their second game, defeating the North African side 1-0 in Moscow.
Spain joined Portugal on four points in Group B, leapfrogging Iran after edging past them in a 1-0 victory that saw them dominate possession but struggle to score.
It was a dramatic and eventful final Group B day both ties ended all square. Cristiano missed a penalty to put Portugal up 2-1, while Spain were trailing Morocco and were in danger of being eliminated from the tournament had Iran held on against Portugal.
Portugal also avoided danger as Iran nearly scored in the last minute of stoppage time, which would have knocked them out.
VAR was involved and penalties were scored and missed and offside goals first disallowed and then given. Spain's Iago Aspas netted in injury time to equalise and had the goal awarded after it was initially given for offiside.
Portugal were briefly leading as Group B winners before Spain equalised, and La Furia Roja won their group having scored more goals but maintaining the same goal difference.
World Cup 2018 - Group B Table Standings
World Cup 2018 - Group B Squads
Spain's 23-man squad: David de Gea, Pepe Reina, Kepa Arrizabalaga; Dani Carvajal, Alvaro Odriozola, Gerard Pique, Sergio Ramos, Nacho, Cesar Azpilicueta, Jordi Alba, Nacho Monreal; Sergio Busquets, Saul Niquez, Koke, Thiago Alcantara, Andres Iniesta, David Silva; Isco, Marcio Asensio, Lucas Vazquez, Iago Aspas, Rodrigo, Diego Costa
Portugal's 23-man squad: Anthony Lopes, Beto, Rui Patricio, Bruno Alves, Cedric Soares, Jose Fonte, Mario Rui, Pepe, Raphael Guerreiro, Ricardo Pereira, Ruben Dias, Adrien Silva, Bruno Fernandes, Joao Mario, Joao Moutinho, Manuel Fernandes, William Carvalho, Andre Silva, Bernardo Silva, Cristiano Ronaldo, Gelson Martins, Goncalo Guedes, Ricardo Quaresma
Morocco's 23-man squad: Mounir El Kajoui, Yassine Bounou, Ahmad Reda Tagnaouti, Mehdi Benatia, Romain Saiss, Manuel Da Costa, Badr Benoun, Nabil Dirar, Achraf Hakimi, Hamza Mendyl; M'bark Boussoufa, Karim El Ahmadi, Youssef Ait Bennasser, Sofyan Amrabat, Younes Belhanda, Faycal Fajr, Amine Harit; Khalid Boutaib, Aziz Bouhaddouz, Ayoub El Kaabi, Nordin Amrabat, Mehdi Carcela, Hakim Ziyech
Iran's 23-man squad: Alireza Beiranvand, Rashid Mazaheri, Amir Abedzadeh; Ramin Rezaeian, Mohammad Reza Khanzadeh, Morteza Pouraliganji, Pejman Montazeri, Seyed Majid Hosseini, Milad Mohammadi, Roozbeh Cheshmi; Saeid Ezatolahi, Masoud Shojaei, Saman Ghoddos, Mehdi Torabi, Ashkan Dejagah, Omid Ebrahimi, Ehsan Hajsafi, Vahid Amiri; Alireza Jahanbakhsh, Karim Ansarifard, Mahdi Taremi, Sardar Azmoun, Reza Ghoochannejhad