Gallego played 42 times for Spain, his debut coming in a preparation match for the impending FIFA World Cup on home soil, a 24 February 1982 win with Scotland: after replacing FC Barcelona's Víctor Muñoz in the second half, he closed the score at 3-0 [REF].
After being used only once during that World Cup, Gallego turned into an essential defensive element in the following two competitions: UEFA Euro 1984 (a runner-up finish) and the 1986 FIFA World Cup, retiring from international play after Euro 88.