Bayern Munich have signed Real Madrid forward James Rodriguez on a two-year loan deal with the option to buy.

The 25-year-old, who signed a six-year contract at Real when he joined from Monaco for £71m in July 2014, made just 22 appearances in La Liga last season.

He had been linked with a summer move to both Premier League champions Chelsea as well as Manchester United.

“Signing James Rodríguez was our coach Carlo Ancelotti’s biggest wish,” said Bayern chairman Karl-Heinz Rummenigge.

“We’re delighted we’ve been able to complete this transfer.”

Colombia captain Rodriguez, the top scorer at the 2014 World Cup, was signed by Ancelotti during the Italian’s two-year spell as Real manager.

But the playmaker found his playing time limited under Zinedine Zidane, who succeeded Rafa Benitez as boss of the Spanish giants in January 2016.