With the Italy national team, Anastasi was a member of the squad that won the 1968 UEFA European Football Championship on home soil, a tournament during which he made his international debut during the first leg of the final against Yugoslavia at the Stadio Olimpico in Rome on 8 June, which ended in a 1–1 draw. In the final replay against the same opponent two days later, he also scored his first international goal, the second goal in Italy's 2–0 victory, with a right-footed volley from just outside the area. He was initially set to take part in the 1970 FIFA World Cup in Mexico with Italy, but he was unable to participate due to injury. In his place, and that of midfielder Giovanni Lodetti, two strikers were called up by manager Ferruccio Valcareggi: Roberto Boninsegna and Pierino Prati, as Italy went on to reach the final. Anastasi also participated at the 1974 FIFA World Cup, scoring one goal in the team's 3–1 victory against Haiti in the first round, although Italy failed to advance from their group. In total, he played 25 international matches for Italy between 1968 and 1975, scoring 8 goals.