After playing for several smaller Italian clubs in the lower divisions of Italian football in his early career, he made his Serie A debut with Chievo in 2003, and eventually came to prominence while playing for Palermo. In 2008, he was signed by German side VfL Wolfsburg, where he remained for two and a half seasons, winning a Bundesliga title in 2009. In 2011, he returned to Italy, joining Juventus, where he later won eight consecutive Serie A titles between 2012 and 2019, among other trophies, including four consecutive Coppa Italia titles between 2015 and 2018.