A versatile player, he could play in midfield or at left-back. He began his career with Manchester United, and made a handful of first team appearances before being transferred to Leeds United in May 2004. He spent two seasons at Elland Road before joining Preston North End for a fee of £250,000 in June 2006. Another two-year spell followed until he joined Stoke City for £500,000 in January after a short loan period. He became a regular under Tony Pulis and helped the club to gain promotion out of the Championship in 2007–08. He appeared in the 2011 FA Cup Final, however he struggled to hold down a regular place in the Premier League and had loan spells back at Preston and then Leeds, before joining Leeds permanently for a second time in January 2012.