AC Milan have signed Real Madrid goalkeeper Diego Lopez for an undisclosed fee.
Lopez, 32, moved to Real in January 2013 after first-choice Iker Casillas broke his hand.
The Spaniard kept his place despite Casillas returning to fitness and made 52 La Liga appearances.
But Real signed Costa Rica international Keylor Navas from Levante this summer and have allowed Lopez to move to the Serie A club.
A Real statement said: "The club would like to express its thanks for his dedication and professionalism, and to wish him luck in this new stage of his career."