Pepe had agreed to join Paris Saint-Germain but signed for Besiktas instead because the French club refused to give him a two-year contract.
The Portugal international was a free agent after being released by Real Madrid this summer, but PSG were initially sceptical about signing the 34-year-old centre-half, who has a history of knee problems.
However, an oral agreement was eventually reached after lengthy negotiations with Pepe's agent, Jorge Mendes, and the defender underwent a fitness assessment by members of PSG's medical team.
Some players were even informed of the former Porto ace's imminent arrival at the Parc des Princes.
However, Besiktas, who had been trying to broker a deal with Pepe for three months, then offered a lucrative two-year deal that prompted a U-turn on the part of the player, not least because of the opportunity to play regular first-team football ahead of next year's World Cup in Russia.
At PSG, by contrast, he would have been Unai Emery's fourth-choice centre-back, behind club captain Thiago Silva, Marquinhos and Presnel Kimpembe.
That was not an appealing prospect for Pepe, who represented his country at this summer's Confederations Cup and fully intends to return to Russia in 12 months' time as a starter for Fernando Santos' reigning European champions.
As a result, he penned a two-year contract with Besiktas on Wednesday, with Ahmet Bulut, who had negotiated the deal on Besiktas' part, revealing that not only had they beaten off competition from PSG for Pepe's signature, but also two of the biggest clubs in Serie A.
"PSG and Inter were also always in contact with Pepe, while Juventus were in the mix afterwards," he told NTV Spor.
"But we had already brought our negotiations to a certain point that meant Juve were never a viable option for Pepe.
"Pepe wanted to know what Besiktas' goal was for next season, and Besiktas want to achieve more than they have for the past two seasons."
Indeed, the Portuguese had also been won over by Besiktas' ambition, with Pepe stating at his unveiling on Wednesday, "My goal is to continue to win trophies. I love my job. I love to give my all on the pitch."
Unsurprisingly, the Super Lig titleholders were enthused by the arrival of an infamously dogged and determined character who won three Primera Division titles and three Champions Leagues during a 10-year spell at the Santiago Bernabeu.
"We have added a very important player with a career and personality that we like," stated Besiktas president Fikret Orman.