"Real Madrid and FC Porto have agreed the transfer of Iker Casillas to the Portuguese club," Real Madrid said in a statement yesterday after three days of intense negotiations.
At 34 years Casillas leaves a club with which he grew up, joining Real's youth academy aged nine in 1990 and winning 19 trophies during his 16 seasons as a professional.
"One of the best goalkeepers in this club is not just leaving, today the greatest goalkeeper in the history of the club and in the history of Spanish football is moving on to a new stage in his footballing career," the statement said.
"Iker is leaving, but his legacy is here forever. His attitude and actions in the 725 games he played in the our jersey shine a light on the path for those who dream of being part of this team," the statement said.
In 2010 Casillas made front pages worldwide in a photograph of him raising the World Cup in South Africa after leading Spain to the title for the first time.