On 13 August 2004, Diarra was named to the senior national team for the first time by Domenech to participate in a friendly match against Bosnia and Herzegovina. He did not make his debut in the match, but was named to the team again in October for 2006 FIFA World Cup qualification matches against the Republic of Ireland and Cyprus. Diarra earn his debut cap in the match against Ireland appearing as a substitute for Olivier Dacourt in a 0–0 draw. He featured with the team heavily in World Cup qualification primarily as a substitute for either Patrick Vieira or Claude Makélélé and, following France's qualification for the tournament, was named to the team to participate in the competition. In the competition, Diarra appeared in two matches. He appeared as a substitute for Vieira in the team's final group stage match against Togo and repeated this in the final match against Italy. France lost the final 5–3 in a penalty shootout, which Diarra did not participate in.