Diarra is also a France international. Prior to playing at senior level, he played at under-20 and under-21 level. With the under-20 team, Diarra played on the team that participated in the 2001 FIFA World Youth Championship. He made his senior international debut in October 2004 in a friendly match against the Republic of Ireland. Diarra has participated in both the 2006 and 2010 editions of the FIFA World Cup. In the 2006 competition, he appeared in a group stage match against Togo and the final match against Italy as a substitute. In the 2010 edition, Diarra captained France for the first time in the team's final group stage match against South Africa.