Andrea Pirlo was "very, very close" to signing for Real Madrid in 2006 and also held talks with Pep Guardiola's Barcelona.
Pirlo played for Milan between 2001 and 2011, winning two Serie A titles as well as a pair of Champions League trophies with the Italian giants.
But during this time, the Rossoneri were involved in the Calciopoli scandal as one of five teams accused of fixing Serie A matches.
This brought their future participation in Serie A and the Champions League into doubt as Pirlo won the 2006 World Cup with Italy, and a move to Santiago Bernabeu almost materialised.
The former midfielder told FourFourTwo: "We had just won the World Cup, but we didn't know what would happen.
"I was very, very close with Real Madrid. But then we got told that Milan could enter Champions League qualifying and be readmitted to Serie A.
"I was offered a new contract straight away and the club did a lot to keep me."
Pirlo also had discussions with Madrid's rivals Barcelona and head coach Guardiola in 2010. "He called me in [to his office after the game] and started talking about how he wanted to play and how he would like me to join his team," he recalled.
"For me, it was a source of pride, especially to talk to him and also to be compared to a Barcelona player. In the end, nothing happened, but being called by Guardiola into his office to talk was a wonderful experience."
Pirlo, now the head coach of Turkish side Fatih Karagumruk, was wanted by English sides, too, with Chelsea one of those who tried to lure him away from Milan.
"Ancelotti asked me to go with him [to Chelsea]," the 43-year-old said. "The two teams talked about it with my agent, and there was a big chance.
"But in the end, when it was time to sign the contract, Silvio Berlusconi [then Milan owner] and Adriano Galliani [CEO] didn't want me to go."
Manchester City also tried to unsuccessfully bring Pirlo to the Premier League before he eventually joined Juventus, where he stayed for four years before ending his career with MLS franchise New York City FC.
"I spoke with Juventus, with Roberto Mancini's Manchester City and with other big teams," he explained. "But in the end, I decided to go to Turin because they had a good project to get back to winning ways.
"They had just gone through some tough years, but they had a new stadium and were building a new Juve, where I would be an important player, so I decided to go there."