Bayern Munich have signed James Rodriguez from Real Madrid on a two-year loan deal, the Bundesliga champions have announced.
Bayern, managed by former Real boss Carlo Ancelotti, will have the option to buy the Colombia international in 2019.
Ancelotti worked with Rodriguez during what was probably his most productive season at the Bernabeu - his debut campaign in 2014-15 - and he will hope to get the best out of the 25-year-old once more.
Rodriguez had fallen out of favour at the Bernabeu to such an extent that he was left out of their squad for the Champions League final in June.
A statement on Bayern's official website read: "FC Bayern Munich and Real Madrid have agreed on the transfer of Colombian national player James Rodriguez to the German champions on Tuesday.
"The two clubs agreed on a two-year loan deal until June 30, 2019 with a following purchase option for FC Bayern Munich.
"James Rodriguez will sign his contract in Munich after successfully completing the compulsory medical check."
Chelsea and Manchester United had been linked with a move for Rodriguez this summer but it had been reported that Real were asking for around €70million for the player.
Rodriguez is set to link up with the Bayern squad immediately and travel with his new team-mates on the club's tour of China and Singapore.