Arsenal will receive £12m from Real Sociedad after passing on the option of re-signing Carlos Vela, who has signed a four-year deal with the La Liga side.
The 25-year-old Mexico international joined Sociedad on loan in 2011 but Arsenal retained a buy-back option when he signed permanently in 2012.
The fee will give Sociedad exclusivity on Vela who has scored 47 goals in 126 matches for the club.
The striker said on the club website: "I've always said this is my home."
In a club statement, Sociedad confirmed: "Real Sociedad have reached an agreement with Arsenal FC which will allow Carlos Vela to continue at the club on a permanent basis.
"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."
In September 2010 he was suspended for six months after an allegation he and Mexico team-mate Efrain Juarez held a party at the team hotel.
Soon after serving his suspension, Vela announced he would refuse to participate at the 2011 Concacaf Gold Cup and also said he did not want to be selected for the 2012 Olympics tournament, which Mexico won.