 Pepe netted his first goal in the top flight on 18 November 2006 in his 23rd appearance in the competition, grabbing the game's only goal at home against former side Palermo in the last-minute, and he helped the Sardinians finally narrowly avoid relegation.On 22 June 2007, Udinese acquired Cagliari's 50% of the player's rights by winning the blind bidding between the two clubs, and in October, Andrea Dossena, Roman Eremenko, Pepe and Cristián Zapata were awarded a new contract until June 2012; after Asamoah suffered an injury, eventually leaving the team, Pepe became an undisputed first-choice.On 9 June 2010, Juventus F.C.