He went on to play 14 times for them before joining his hometown club Middlesbrough on loan, then permanently for a fee of £7 million. He joined Tottenham Hotspur for £8 million in 2008. He scored the winning goal for Spurs in the League Cup Final against Chelsea and went on to play 44 times in the 2008–09 season. After more injury problems, he only made four appearances in the next two seasons and was released in 2011 and signed a pay-as-you-play deal with Stoke City. He spent the 2011–12 season at Stoke and after his contract expired re-signed for Middlesbrough, remaining there until his retirement in 2016.