Inter, Juventus and Paris Saint-Germain were among the clubs to miss out on former Real Madrid defender Pepe, who has joined Besiktas.
The 34-year-old left the Bernabeu after a decade at the end of last month following the expiration of his deal and has now signed for the Turkish champions.
“The talks lasted three months, we didn’t find the agreement with Besiktas in a week,” agent Ahmet Bulut told NTV.
“Paris Saint-Germain and Inter wanted him, and Juventus made an attempt at the last minute but we were at a point where the Bianconeri were no longer an alternative.”
The Portugal international won three La Liga titles and three Champions League crowns in a trophy-laiden decade at Los Blancos.