Arsenal and Real Madrid have agreed a deal to swap midfielder Jose Antonio Reyes for forward Julio Baptista.
Reyes joined the Gunners in January 2004
The terms agreed are for a season-long loan deal but the switch could become permanent at a later date.
Reyes, 22, had long campaigned for a move back home and Real and Atletico Madrid had both been linked with swoops for the forward.
Arsenal had hoped to sign Brazil's Baptista a year ago, but he chose Real where he has failed to settle down.
Baptista did not train with Madrid on Thursday, with reports suggesting he was in London taking a medical and processing a work permit.
Reyes joined Arsenal from Sevilla in January 2004 and last year extended his contract to 2011.
Last month, the midfielder told the Spanish press he was keen to leave Arsenal for Madrid, saying he had not adapted to life in England.
Reyes has not played for Arsenal so far this season with Gunners boss Arsene Wenger believed to have not used him in the Champions League in order not to cup-tie the midfielder and reduce his value.