Carlos Vela has signed a four-year contract with Real Sociedad, ending speculation that he could return to Arsenal.
The 25-year-old forward has spent the last two seasons on loan to the La Liga outfit after struggling to hold down a first-team place with the Gunners.
The Spanish side have now agreed a permanent deal with Arsenal for the Mexican.
"Real Sociedad have reached an agreement with Arsenal FC which will allow Carlos Vela to continue at the club on a permanent basis," a statement on Sociedad's official website read.
"The player meanwhile, has signed a contract extension which ties him to Real Sociedad for the next four seasons. The player's previous contract was due to expire in June 2016. The Mexican striker has now formally signed his new contract."
Vela has scored 47 goals in 126 appearances for Sociedad.