Arsenal midfielder Robert Pires has agreed a two-year contract with Villarreal.

Pires will join on a free transfer after spending six years at Arsenal.

“I have decided to accept a new challenge at Villarreal for the next two years of my career,” said Pires on Arsenal’s website.

Pires, 33, had been offered a new one-year contract by Arsenal, but the player was holding out for a two-year deal.

“I am delighted to have signed for Villarreal for the next two seasons and hope to help the club to continue the great work they have done in the past few years,” Pires told the Villarreal website.

Arsenal manager Arsene Wenger said: “Robert has had six tremendous years with us and made a huge contribution to the team’s success during his time here.

“He is not only a great footballer but a good man, so of course, we are sad to see him go.

“I would like to thank Robert for the dedication, determination and passion he has shown and wish him well in his career.”

Arsenal signed Pires from Marseille for £6m in 2000. His final match for the Gunners was the Champions League final, when he was taken off midway through the first-half following the dismissal of goalkeeper Jens Lehmann.

He was voted the Football Writers’ Player of the Year in 2002 and won two Premiership titles and two FA Cup winners as an Arsenal player.