Carlos Vela has said he is looking forward to a "great year" at Real Sociedad after it was confirmed that a deal worth a reported 11 million euros had been done with Arsenal to allow him to stay.
Vela's future had been up in the air because of a buy-back clause that would have allowed the Gunners to bring the Mexico international attacker back to London over the summer for a reported four million euros.
Talks between the two clubs to resolve the issue have been concluded, Real said in a statement on Tuesday.
AS put the sum Arsenal received at 11 million euros, adding to the 3.5 million paid when Vela, 25, joined the Basque outfit in 2011.
The player told the club's official website he was delighted to be staying in San Sebastian and was looking forward to a successful 2014-15 campaign.
"I have always said this is my home. I am very happy in San Sebastian, there is no place like this, and I told the president that when he asked me about my intentions," he said.
"We were aware that it would not be easy, but fortunately it has been resolved well and all parties are happy. This club, this team, has the ambition to keep improving, and I am convinced that we will have an exciting year."
Real Sociedad's statement also confirmed Vela's four-year contract, adding: "Real Sociedad has reached an agreement with Arsenal for Carlos Vela to continue at the txuri urdin club.
"Real Sociedad have also reached an agreement with Carlos Vela to renew his contract for four seasons. The previous accord was to end in 2016. The Mexican attacker has already signed his new deal."