After his departure, Silva seemed on the verge of signing a three-year deal with Italian side Lazio, with a medical reportedly arranged to take place in Rome.
However, at the last minute, he decided to head back to his native Spain, signing a two-year contract with his new club.
Real Sociedad finished sixth in La Liga last season and, unlike Lazio, will not be playing in the Champions League next year.
“We are delighted to announce the signing of [David Silva]”, the club tweeted on Monday. “The player joins Real as a free agent until June 30, 2022 #WelcomeDavid.”
The former Spain international joined Manchester City from Valencia in 2010 and went on to make 436 appearances.
On the day he completed his move back to Spain, City announced it would honor the playmaker, nicknamed ‘El Mago’ (‘the magician’), with a statue outside the Eithad Stadium.
“David is a transformational player, a quiet leader who has inspired everyone around him,” said City chairman Khaldoon Al Mubarak.
“David’s statue will act as a lasting reminder of the wonderful moments that he gave us, not only as an incredible footballer, but as an inspiring ambassador who represented this football club with great dignity at all times.”
Former teammate Vincent Kompnay, who announced his retirement from professional football on Monday, will also receive a tribute from the club in 2021.