Sterling had been in negotiations with City for several months and the England winger has finally agreed to the bumper new deal after being linked with a move to Real Madrid.
Sky Sports News reported on November 1 that Sterling's representatives had reached a verbal agreement with City over a new deal.
The 23-year-old is now tied to City until 2023, with reports earlier this month claiming his extended contract would be worth £300,000 ($389,000) per week, making him England's best-paid player.
The England worldwide has registered seven goals and five assists this season.
Sterling joined City from Liverpool for £49 million in 2015 and won the league title and League Cup last season.
Don't get carried away with rumours on Brexit border breakthrough, Ireland warns
Michel Barnier cited the anti-EU British MEP Nigel Farage as a cautionary example at a conference of the centre-right European People's Party.
But Sterling feels at home at City and believes the Premier League champions are the ideal place for him to continue developing.
Reacting after signing the dotted lines Sterling said: "I'm delighted to sign". It's really paid off for me and I'm really grateful. "How we've developed with Pep with and without the ball, it's always nice for attacking players to have as much possession as possible, It's been a real joy".
The 23-year-old attacker has come on leaps and bounds at City since joining from Liverpool in 2015, a deal which may eventually cost the club almost £50 million ($A90 million).
However, the England global opted to remain under the tutelage of Guardiola, as they continue preparations for Saturday's derby clash with Manchester United.
'We're all delighted he has committed his future to City'. Raheem was guaranteed to compete for the Premier League and Champions League every season, and work under one of the best managers of all-time. "His statistics tell their own story", Begiristain said.
- Microsoft Word gets AI-powered to-do lists and collaboration feature
- Harmanpreet Kaur battled stomach cramps, back issues during sensational innings
- Floods in Jordan kill 11, force tourists to flee Petra
- Kuchar fires 64 to lead by two in Mexico
- Federer, Djokovic top the bill for London finale
- Five die in California wildfires, 150,000 forced to flee
- Cesar Sayoc Indicted On Charges Carrying Potential Life Prison Penalty
- Oil prices slump into ‘bear market’ after five weeks of losses
- Fallout 76 Servers Will Remain Live Until the Sun Burns Out
- Burnley's Kiwi striker Chris Wood set for 'emotional' return to Leicester City