Bayern Munich have agreed to sell Douglas Costa to Juventus.

The deal is structured as a €6 million loan for the 17-18 season with an obligation to buy for €40 million.

Costa had an outstanding first season for Bayern after arriving from Shakhtar Donetsk in 2015, but he didn't play as well under Carlo Ancelotti as he did for Pep Guardiola.