Bayern Munich have signed James Rodriguez from Real Madrid on a two-year loan deal, the Bundesliga champions have announced. Bayern, managed by former Madrid manager 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 playmaker 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 Uefa 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 £70 million (Dh331m) for the player. Rodriguez is set to link up with the Bayern squad immediately and travel with his new teammates on the club's tour of China and Singapore. <strong>From Bayern's Twitter account:</strong>