Xavi played for Spain at the 2000 Olympics, 2002 World Cup, Euro 2004, 2006 World Cup, Euro 2008, 2009 Confederations Cup, 2010 World Cup, Euro 2012, 2013 Confederations Cup and the 2014 World Cup. In 1999 in the Fifa U20 Youth cup in 1999, Xavi was a part of the Spanish team that won the tournament in Nigeria.