The history of the Spain national football team dates back to the team's formation and first ever international match in 1920. The Spain national football team has experienced a number of successes, most notably their victories at the 2010 FIFA World Cup and the 2026 FIFA World Cup and their record four European titles.

Beginnings and early success Hondarribia, 1913

Spain's first international representative matches was arranged by the influential sports administrator José Ángel Berraondo, under the auspices of the Real Unión Española de Clubs de Foot-ball. The first friendly match, which all took place at Estadio de Amute, Hondarribia, was played against France (called-up by the Ligue de football association, a French federation of football clubs chaired by Jules Rimet) on 25 May 1913. This is not considered an official friendly match by FIFA.

Antwerp 1920 Olympic Games

The first Spain national football team was constituted in 1920, with the main objective of finding a team that would represent Spain at the Summer Olympics held in Belgium in that same year.

Spain made their much anticipated debut at the tournament on 28 August 1920 against the national team of Denmark (runners-up in the last two previous Olympic tournament). The match took place at the Stade Joseph Marien in Brussels. The Spanish won that match by a scoreline of 1–0 thanks to a goal from Patricio Arabolaza, who thus became Spain's first international goalscorer. This match would also make Spain, at that time, the 28th nation to play a football match. In their next match stage, Spain were set to play their next game against the hosts Belgium; in that match, Spain could not come up with the victory and lost 1–3.

Hosts Belgium ended up winning the tournament after the Czechoslovaks were disqualified for leaving the pitch in the middle of the final game, thus Spain and another three national teams were giving the chance to play a small consolation tournament where the winner would win either the silver or bronze medal. Their first match in this new "quarter-finals" was played against Sweden in which the Spanish came from a goal behind to win 2–1 at the very end. José María Belauste and Domingo Acedo were the scores of that game. The following match was played against Italy. Félix Sesúmaga scored the two fabulous goals that would give the Spanish a 2–0, eliminating the Italians and giving them the victory to send them to the semi-finals of the tournament (Until UEFA Euro 2012, this had only been the only time Spain had beaten Italy in an official match). The final four teams were Spain, the Netherlands, France and Czechoslovakia. But only the Netherlands advance to final match against Spain due to France not showing up and the Czechs being disqualified previously. In the final match, Spain defeated the Dutch 3–1 with two goals from Félix Sesúmaga and one from Pichichi. With this, Spain won the silver medal at the Olympics and their first international silverware at any tournament.

The medalist at that Olympic tournament were: Domingo Gómez-Acedo, Patricio Arabolaza, Mariano Arrate, Juan Artola, Joaquín Vázquez, José María Belauste, Sabino Bilbao, Ramón Eguiazábal, Moncho, Ricardo Zamora, Silverio Izaguirre, Pichichi, Luis Otero, Francisco Pagazaurtundúa, Josep Samitier, Agustín Sancho, Félix Sesúmaga and Pedro Vallana with the coach at that time Paco Bru.

Although it was a very successful event for the national team, it would take many years later to achieve that success again. In 1929, Spain became the first team from Continental Europe to beat England, winning 4–3 in 1929.

1950s The Spanish Civil War and World War II prevented Spain from playing any competitive matches between the 1934 World Cup and the 1950 World Cup qualifiers, where they overcame Iberian rivals Portugal, who later declined an invitation to take part, with a 5–1 win and 2–2 draw. At the finals in Brazil, they topped their group against England, Chile and the United States to progress to the final round. For the first, and so far only time in the history of the FIFA World Cup, the winner was decided, not by a single championship match, but via a group format involving the four teams who had won their respective groups in the previous stage. The four teams in the final group were Uruguay, Brazil, Sweden and Spain. Spain failed to record a win (W0 D1 L2) and finished in fourth place. Until 2010, this had been Spain's highest finish in a FIFA World Cup finals, which had given them the name of the "underachievers." Spain's leading scorer during the 1950 World Cup, who ended the tournament with five goals.

1960s Under French-Argentine coach Helenio Herrera and Italian assistant coach Daniel Newlan, Spain came out of dormancy to qualify for the first European Championship in 1960. Spain beat Poland 7–2 on aggregate to progress to the quarter-finals. In the quarter-finals, Spain, who were under Francoist rule, refused to travel to the Soviet Union for political reasons. Proposals to play the tie in a one-legged format at a neutral venue were rejected by the Soviets, and Spain was disqualified.

The Spaniards, led by Alfredo Di Stéfano, qualified for the 1962 World Cup, beating Wales 3–2 over two legs to advance to the UEFA/CAF play-off where they would beat Morocco 4–2 over two legs to advance to the final.

Spain won its first major international title after winning the 1964 European Championship held in Spain. Spain was able to defeat a highly favored Hungary side 2–1 to advance to the final against the Soviet Union, which was awarder a walkover win four years earlier. Spain would go on to win the final played in Madrid by the exact score of 2–1 after Marcelino broke the 1–1 tie in the 84th minute. The victory would stand as Spain's lone major title for 44 years.

Spain qualified for the 1966 World Cup in England, drawn into a group which included West Germany and Argentina. They lost to both those teams 2–1 in Birmingham and Sheffield, respectively. This effectively ensured their elimination from the group stage, although they were able to gain some dignity by beating Switzerland 2–1.

1968–1977 and period of decline Spain then reached a low point in its history where they failed to qualify for the 1968, 1972 and 1976 European Championships in Italy, Belgium and Yugoslavia respectively, and they also failed to qualify for the 1970 and 1974 World Cup tournaments in Mexico and West Germany respectively. This reflected the turbulent time in Spain's general history; the fascist government led by Franco was nearing the end of its reign, which effectively happened in 1975.

Late 1970s–1980s

Spain qualified for the 1978 World Cup in Argentina. This proved to be a difficult tournament for the Spanish team as they played under varying pitch conditions. Spain lost their first match 2–1 against Austria in the José Amalfitani Stadium of Buenos Aires, which had the best-maintained pitch of the tournament. They then drew with tournament favorites Brazil in Mar del Plata, which had probably the worst-maintained pitch of the tournament; there were rumors the Argentine authorities deliberately sabotaged the Mar del Plata pitch to lessen the chances of Brazil's successes, as Brazil played all their matches there. The atrocious pitch was filled with holes, but Spain kept Brazil from scoring any goals. Spain went back to the excellent pitch of the Estadio José María Minella, where they beat Sweden 1–0. But Spain were eliminated after Austria's two victories and one loss, and Brazil's one win and two draws meant that Spain had a worse record than both.

In 1980, for the first time since 1964, Spain qualified for the European Championships, again held in Italy. However, they were eliminated in the group stage after two 2–1 losses against Belgium and England and a draw against hosts Italy.

Spain as the 1982 FIFA World Cup hosts In 1976, Spain was selected as host of the 1982 World Cup. This edition of the World Cup featured 24 teams for the first time. Expectations were high for Spain as the host nation under coach José Santamaría. In the group stage, where they played all their matches at the Luis Casanova Stadium in Valencia. They were drawn into Group 5, in which they could only manage a 1–1 draw with Honduras in their first match. They followed this with a 2–1 victory over Yugoslavia, but were then defeated 1–0 by Northern Ireland. These results were enough to secure progress to the second round, where they were drawn into Group B, but defeats to West Germany and a goalless draw with England – both rather humiliatingly at the Santiago Bernabéu Stadium in Madrid – meant that Spain were knocked out, and Santamaría was subsequently sacked.

Former Real Madrid coach Miguel Muñoz, who had temporarily coached Spain in 1969, returned to coach the national team. Spain was placed in Euro 1984 qualifying Group 7, alongside the Netherlands, the Republic of Ireland, Iceland and Malta. Entering the last match, Spain needed to defeat Malta by at least 11 goals to surpass the Netherlands for the top spot in the group, and after leading 3–1 at half time, Spain scored nine goals in the second half to win by 12–1 and thus also the group. In the final tournament, Spain was drawn into group B with Romania, Portugal, and West Germany. After 1–1 draws against their first two opponents, Spain topped the group by virtue of a 1–0 victory against West Germany. The semi-finals saw Spain and Denmark drawn at 1–1 after extra time, before Spain proceeded by virtue of winning the penalty shootout 5–4 on penalties. Hosts and tournament favourites France defeated Spain 2–0 in the final after a goalless first half.

Spain qualified for the 1986 World Cup in Mexico having topped Group 7 with Scotland, Wales and Iceland. Spain began the group stage by losing to Brazil 1–0, but progressed after beating Northern Ireland 2–1 and Algeria 3–0. Round 2 paired Spain with Denmark, who they overcame 5–1 with Emilio Butragueño scoring four goals, but in the quarter-finals, a 1–1 draw with Belgium ended with Belgium winning 5–4 on penalties.

Muñoz was retained as coach for Euro 1988. As in the several previous tournaments Spain qualified impressively in a group with Austria, Romania and Albania. Spain were drawn into group A and began their tournament with a 3–2 victory over Denmark, but were nevertheless knocked out in the group stage after losing 1–0 and 2–0 to Italy and West Germany respectively.

1990s For the 1990 World Cup in Italy, Spain had a new coach, Luis Suárez. Having qualified from a group consisting of Republic of Ireland, Hungary, Northern Ireland and Malta, Spain entered the competition on a good run of form, and after reaching the knock out stages through a 0–0 draw with Uruguay and wins over South Korea (3–1) and Belgium (2–1) in Udine and Verona and winning their group, they fell to a 2–1 defeat to Yugoslavia in their Round of 16 match in Verona.

Newly appointed coach Vicente Miera failed to gain qualification for Spain for Euro 1992, after finishing third in a group behind France and Czechoslovakia. Vicente Miera did, however, lead Spain to the gold medal at the 1992 OlympicsSince 1992, squads for Football at the Summer Olympics have been restricted to three players over the age of 23. The achievements of such teams are not usually included in the statistics of the international team. in Barcelona.