Valencia's Argentine international centre-back Roberto Ayala has agreed to join regional rivals Villarreal on a three-year deal at the end of the season.
Villarreal released a statement saying the 33-year-old, who is free to negotiate with other clubs because his present deal finishes at the end of the season, had signed a contract with them until June 2010.
Ayala set a new Argentine record of 107 appearances when he led his side to a 1-0 win over France in Paris on Thursday morning AEDT.
Last August he said he wanted to leave Valencia after accusing the president and sporting director Amedeo Carboni of backtracking on a promised contract renewal.
The club opened disciplinary proceedings against the defender, but the two sides patched up their differences and he has been a regular in the starting line-up once again this season.
Ayala began his career with Argentine side Ferro Carril Oeste, before joining River Plate in 1993.