The 23-year-old, who has scored seven goals in 14 games this season, will remain at the Etihad Stadium until the summer of 2023.
He says he is thrilled to have penned a new deal and believes he is in the best place to continue improving his game.
“I’m delighted to sign," he said. "My development here has been incredible.
"I felt from the minute I got here it was the right choice for me. It’s paid off and I’m really grateful.”
Director of Football Txiki Begiristain added: “This is a significant moment for the Club. Raheem has improved dramatically in the past two seasons and is now one of the Premier League’s best attacking players. His statistics tell their own story.
“He’s quick, strong and excellent in front of goal – everything a modern-day forward needs to excel.
“We’re all delighted he has committed his future to City.”
Sterling joined City from Liverpool in the summer of 2015.
During his time at Anfield, he scored 23 goals in 129 games, won the 2014 Golden Boy award and established a reputation as one of the game’s brightest prospects.
His first season with us saw him score 11 goals in 46 games as City won the League Cup – Sterling’s first piece of major silverware - and reached the Champions League semi-finals, losing 1-0 on aggregate to Real Madrid.
Pep Guardiola’s arrival in the summer of 2016 hailed a new era for the Club, and Sterling’s game has improved dramatically under the Catalan’s watchful eye.
He has played numerous different roles under Guardiola, and the result is a more well-rounded, confident player.
Last season saw him play a central role in the Club’s best-ever campaign. He scored 23 and assisted 17 in 46 matches across all competitions as we won the Premier League and Carabao Cup, and he has started the current campaign superbly, scoring seven in 14.
He has been directly involved in 40 Premier League goals since the start of last season (24 goals, 16 assists). Indeed, only Mo Salah can boast a better record over the same period.
Everyone at City is delighted Raheem has extended his stay at City and we all wish him the very best in the remainder of his time here.
Season-by-season City stats
2015-16: Played 47 | Goals 11 | Assists 10
2016-17: Played 47 | Goals 10 | Assists 21
2017-18: Played 46 | Goals 23 | Assists 17
2018-19 (so far): Played 14 | Goals 7 | Assists 7
Raheem Sterling - A stellar reputation
Gareth Southgate: “Raheem knows how much we think of him and what a valuable part of the team we feel he is.
“I think life in sport is about developing resilience. The top players all have to overcome setbacks and are constantly being questioned. We think their world is easier because of their status but actually there’s more pressure on them.
“He’s dealt with it really well for someone who is still really young.
“I know how ambitious he is, I know the easy thing is sometimes to step back from the challenge. But you have to keep proving in life you’re ready to answer the questions asked of you.”
Kyle Walker: “Raheem Sterling is a joy to work with. I’ve played numerous games with him now on the right-hand side.
“It’s a pleasure to play behind him. I said to him at the start: 'Play with a smile on your face.'
"I feel that - with the players we have in the dressing room and the manager we have - everyone can help him. He’s reaching the levels he can do but there is still work to be done.
“He needs to dedicate himself to the game to make sure he’s one of the very best players in the world.”
Pep Guardiola: “Raheem is a top, top player. But he is so young.
“He is incredible, sharp, fast, clever, fighting, ambitious, decisive, can play on both sides, in the middle, receive ball behind lines.
“I think he enjoys scoring now and making assists and being important.
“He’s a winning player. He is so, so important. He is stable, focused. He can become better player. He can reach whatever he wants.
“But still, with young players, like with Leroy, they can still improve.”
Jamie Carragher: “When you look at what this lad is achieving, the move to Manchester City, the pressure and the price-tag. Plus Pep Guardiola, who everyone wants to play for, came in and can get players from Spain and anywhere in the world.
"This young English lad is thriving under maybe the best manager in the world and in the best team in the league. He deserves everything he gets.
"On the back of the Spain game against England (in which Sterling scored a brace), hopefully we will see a bit more of that.
"What he is doing for Manchester City now… we always talk about Sergio Aguero, David Silva and Kevin De Bruyne, but he is now in that company."
Jurgen Klinsmann: "He's a bit unpredictable. Maybe even for himself. But he has a nose for expecting the ball in certain areas. He's somebody who keeps the opponent nervous.
"You need one-on-one players, even more today when you can come up against a block of eight or nine players and you need someone to take them on."
Alan Shearer: "Of all the work that Pep Guardiola has done at City, the improvement in winger Raheem Sterling stands out for me.
"His goal tally for City last season was almost double his previous best tally. Someone who looked in two minds in front of goal is now an assured finisher. He is arguably the most skilful attacking player in an England shirt alongside Harry Kane."
Eric Dier: "First of all, the way Raheem handled everything has been incredible.
"The way he goes about his job has been fantastic, his attitude, work ethic, both fantastic as well.
"He offers so much to the team. His forward runs and quality in possession, he can link the play or go behind.
"It's so clear to see if you were to watch back the games, the importance he has on the team. I think he's had a fantastic World Cup."