Iker Casillas' 25-year association with Real Madrid ended on Saturday with the club announcing the departure of their veteran captain to Porto.
The 34-year-old Casillas had two years left on his contract with Real, but after three difficult seasons and amidst constant transfer speculation this summer, the captain has left for a fresh start.
A statement from Real read: "Real Madrid and FC Porto have reached an agreement for the transfer of Iker Casillas to the Portuguese club.
"For Real Madrid today is a day gratitude and acknowledgement. Today the best goalkeeper in the history of Real Madrid and of our country leaves the club to begin a new stage in his career."
Real announced that Casillas will host a news conference on Sunday at noon local time at the Bernabeu stadium.
Casillas is expected to sign a two-year deal with Porto, with an option to extend his stay for a further season. Real will reportedly pay up to 50 percent of his wages.
Casillas joined Real's youth academy in 1990 and has been with the club ever since, winning 17 major honours in that time.
He played 16 years with the first team and made 725 official appearances for the club -- second behind Raul's 741 -- since making his first-team debut in 1999.
- Real Madrid C.F. (@realmadriden) July 11, 2015
A World Cup winner and two-time European champion with Spain, Casillas owns five Primera Division titles with Real, as well as three Champions League trophies and two Copa del Rey crowns.
"Iker has managed to become one of our main reference points and has earned the respect, admiration and affection of fans beyond colours and feelings," the Real statement continued. "Iker is gone, but his example remains. His behaviour during the 725 matches played with our shirt shows the way to those who dream of being part of this team.
"Thanks, Iker, for everything. Thanks for being a symbol of the best in our history. You belong forever to the heart of Real Madrid."
The departure of Casillas should pave the way for Real to sign Manchester United goalkeeper David De Gea, who has been linked to a move to Madrid this summer. The former Atletico Madrid keeper is under contract at United for another season.
Real are also reportedly close to a deal with Espanyol's Kiko Casilla, though president Joan Collet said his club rejected a bid from Real earlier on Saturday.
Trouble for Casillas at Real first reared its head when he lost his starting place under former Real coach Jose Mourinho.
Real signed goalkeeper Keylor Navas to a six-year deal last summer, and the Costa Rica international did make a handful of starts early this past season for the Spanish club, but Casillas regained his spot in the first XI.
Real did not win any silverware in 2014-15, finishing runners-up to Barcelona in the Primera Division and crashing out of the Champions League in the semifinals.
Their disappointing end to the campaign led to the sacking of Carlo Ancelotti, who had guided Real to a record 10th European Cup the year before.
Real appointed Rafa Benitez as Ancelotti's replacement earlier this month and travel on Sunday to Australia to begin their summer tour.
Porto, coached by former Real Madrid and Spain goalkeeper Julen Lopetegui, will compete in next season's Champions League after finishing runners-up to Benfica in the Portuguese Liga in 2014-15.
Casillas had also been a reported target of Turkish giants Fenerbahce, as well as Roma and Valencia.