The new deal will keep him at the club until 2012.
“I am delighted to commit my future to Manchester City,” he told the club’s official website.
“The last week has been extremely difficult for my family and me but it is a terrific boost to sign a long-term deal, which I hope shows my commitment to the club and the fans as well as the club’s commitment to me.
“I am very settled at the club and the support I have received from my partner, family and everybody around me has been fantastic.
“The events surrounding my withdrawal from the Ireland squad last week have been well publicised and are not something I want to dwell on. However, I want to reiterate my regret over what happened.
“I received some very upsetting news when I was told by my partner that she had suffered a miscarriage and unfortunately became swept up in an unforeseen series of events on an issue that was deeply personal to us.
“At no time did I realise that an issue which should have been private and confidential between my partner and I would receive so much media attention – but now it is time for me to move on.”