Schalke have agreed a deal to sign on-loan Manchester City defender Matija Nastasic on a permanent basis.
The Serbia international joined the Bundesliga side in January and Press Association Sport understands the loan was structured with a view to the 21-year-old remaining with the club full-time if he made a certain number of appearances.
Schalke announced on their website Nastasic has committed to a contract until June 2019.
"I am proud and happy that I remain a Schalke," the centre-back told schalke04.de.
"The team did very well taking me from day one, I was immediately a part of the team.
"In the future I would like to help us to achieve our goals as a team."
Nastasic, a product of Partizan Belgrade's academy, moved to City from Fiorentina for a reported £12million in August 2012 and was named the club's young player of the year in his first season.
However, his second campaign was less successful as a knee injury cut short his season in February, although he finished with a Premier League winners' medal.
Nastasic made the last of his 51 appearances for the club in the Community Shield defeat to Arsenal in August.