Juventus have activated Bayern Munich winger Douglas Costa’s 46m euro (£41m) buyout clause to make his loan move permanent at the end of the season.
The 27-year-old, who joined Bayern from Ukrainian club Shakhtar Donetsk for 30m euros in 2015, has been on loan at the Italian champions since the summer.
Bayern chairman Karl-Heinz Rummenigge confirmed Costa’s departure on Friday.
The Brazilian has scored once and made four assists in 16 appearances for the Italian champions this season.
Having played for Bayern under Pep Guardiola, he fell out of favour when Carlo Ancelotti took charge.
Bundesliga champions Bayern will receive a record fee for his departure, beating the 25m euros they were paid when Toni Kroos went to Real Madrid in 2014, and Owen Hargreaves was sold to Manchester United in 2007.