The Spain international has been with the Manchester club since 2014 and he has now penned a new deal that will see him remain at the club until 2020.
“I am so happy to have committed my future to City,” the 31-year-old told the club's official website.
“I am incredibly proud of what I have achieved at City in my seven-and-a-half seasons here and with Pep in charge, I feel we are in a great position to win trophies this season and beyond.
“The style of football we are playing is a pleasure to be a part of and I look forward to winning more titles in the years to come.”