Bayern Munich have signed Real Madrid star James Rodriguez on a two-year loan deal with an option for a permanent transfer, subject to a medical.
Manchester United, Paris Saint-Germain, Chelsea and Juventus were among the clubs linked with Colombia international James, 25, in recent weeks as Madrid president Florentino Perez reportedly held out for a fee of at least €70 million.
However, Bayern coach Carlo Ancelotti has made a successful bid to be reunited with a player he coached while at Madrid in 2014-15, with the two clubs agreeing a two-year loan with an option to buy in June 2019.
Sport Bild reporter Christian Falk has said Bayern agreed an annual loan fee of €5 million and can pay €35.2 million to make it permanent.
Bayern CEO Karl-Heinz Rummenigge said: "We are delighted to have realised this transfer. It was our coach Carlo Ancelotti's big wish to sign James Rodriguez, following their successful spell working together in Madrid.
"James is a versatile player. He's dangerous in front of the goal, sets up a lot of strikes and takes great set pieces. Without a doubt, we've increased the quality of our squad with this transfer once again."
IT'S OFFICIAL! #FCBayern have signed @jamesdrodriguez on a two-year loan deal. More to follow... #MiaSanMia #ServusJames pic.twitter.com/l6DToUrXxZ
- FC Bayern English (@FCBayernEN) July 11, 2017
James has had a mixed three-year spell at the Bernabeu since joining from Monaco for €80 million following the 2014 World Cup and had seemed certain to leave this summer, having been left out of the squad as Zinedine Zidane's side won the Champions League final in June.
Madrid's club statement was short on detail but said the deal was still subject to James completing a medical at Bayern.
"Real Madrid and Bayern Munich have agreed the loan of the player James Rodriguez for the next two seasons, pending the completion of a medical," the Madrid statement read. "Bayern Munich reserve the right to buy the player at the end of the loan period."
James was due to fly out with Madrid to California to begin their preparations ahead of the summer's International Champions Cup, but will now instead join up with Bayern's tour of Asia starting on Sunday.
Despite not being a regular first choice under Ancelotti's successors Rafa Benitez and Zidane, James played 111 times in total for Madrid, scoring 36 goals and providing 41 assists. He also leaves the Bernabeu having won two Champions League medals, one La Liga title and two FIFA World Club Cups.
ESPN FC's Germany correspondent, Stephan Uersfeld, contributed to this report.