Atletico Madrid and Benfica have reached an agreement over the transfer of goalkeeper Jan Oblak to the Spanish champions.
The 21-year-old Slovenian stopper is set to sign a six-year contract at Vicente Calderon, pending a medical.
Chelsea's Thibaut Courtois had been Atleti's first choice during a three-year loan spell in the Spanish capital, but with the chances of a fourth temporary deal looking unlikely, the acquisition of a goalkeeper was high on the club's list of priorities for the close-season.
"Oblak is a goalkeeper with great quality and great future, who will bring us many of his great qualities," said sporting director Jose Luis Caminero. "We are very happy with to have him.
"This is great news for our club."
Oblak made 25 first-team appearances as Benfica completed a treble last season with victories in the Primeira Liga, Taca de Portugal and Taca da Liga.
The former Olimpija man, who has three caps for his country, was also in goal as the Portuguese side lost the UEFA Europa League final to Sevilla on penalties.