Halilhodžić was capped 15 times for the Yugoslavia national team, scoring eight goals. After debuting as a full international in June 1976, he also appeared in a few matches for Yugoslavia under-21 team in 1978, helping them win the 1978 European Under-21 Championship where he claimed the Golden Player award for the best player in the tournament. Halilhodžić, who was 26 at the time, took advantage of the rule that allowed two players over the age of 21 to participate – hence him and Velimir Zajec (who had also already debuted for Yugoslavia full squad in 1977) were the two senior players brought in to strengthen the under-21 squad.