Yahia was part of the Tunisian 2004 Olympic football team, who exited in the first round, finishing third in group C, behind group and gold medal winners Argentina and group runners-up Australia. He was part of the squad that won the 2004 African Cup of Nations.