Alonso began his career at Real Sociedad, the main team of his home region Gipuzkoa. After a brief loan period at Eibar he returned to Sociedad where then manager John Toshack appointed Alonso as his team captain. Alonso succeeded in the role, taking Real Sociedad to second place in the 2002–03 season. He moved to Liverpool in August 2004 for £10.5 million. He won the UEFA Champions League in his first season at the club, scoring the equalising goal in the final. The following season he won the FA Cup and the FA Community Shield. He moved to Real Madrid for the start of the 2009–10 season, in a deal worth around £30 million. Internationally, Alonso has represented Spain in the Euro 2004, Euro 2008 tournaments and in the 2006 World Cup and 2010 World Cup. He made his international debut in April 2003 in a 4–0 victory against Ecuador, and he won Euro 2008 and the 2010 World Cup with Spain.