Raheem Sterling scored a quickfire second-half hat trick as 10-man Manchester City thrashed Atalanta 5-1 on Tuesday to put one foot in the Champions League knockout stages.

The England forward struck three times in the space of 11 minutes after Sergio Aguero had netted twice to cancel out Ruslan Malinovsky's penalty opener for the visitors at the Etihad Stadium.

More Images
Manchester City's Raheem Sterling holds the ball at the end of the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. Manchester City won 5-1 and Sterling score an hat trick. (AP PhotoDave Thompson)

Raheem Sterling scored a quickfire second-half hat trick as 10-man Manchester City thrashed Atalanta 5-1 on Tuesday to put one foot in the Champions League knockout stages.

Manchester City's Raheem Sterling, left, celebrates with his teammate Phil Foden after scoring his side's fourth goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

However, there were a couple of negatives for City as midfielder Phil Foden was sent off for two bookable offences and Rodri hobbled off injured.

Manchester City's Raheem Sterling, right, scores his side's fifth goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. On the left is Atalanta's goalkeeper Pierluigi Gollini. (AP PhotoDave Thompson)

And the visitors took the lead after 28 minutes as Fernandinho brought Josip Ilicic down just inside the area and Malinovskyi sent Ederson the wrong way from the resulting spot kick.

Manchester City's Raheem Sterling celebrates after scoring his side's third goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Atalanta offered little after the break and City took a firm grip on the game with a fine team goal just before the hour.

Manchester City's Phil Foden, right, receives a red card by referee Orel Grinfeld during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Remo Freuler put the ball in the net for Atalanta but was ruled offside before Sterling completed his treble by turning home an inviting cross by Mahrez.

Manchester City's head coach Pep Guardiola gestures from the bench during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Manchester City's head coach Pep Guardiola gestures from the bench during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Atalanta manager Gian Piero Gasperini gestures during the Champions League Group C soccer match at the Etihad Stadium, Manchester, England, Tuesday Oct. 22, 2019. (Martin RickettPA via AP)

Atalanta manager Gian Piero Gasperini gestures during the Champions League Group C soccer match at the Etihad Stadium, Manchester, England, Tuesday Oct. 22, 2019. (Martin RickettPA via AP)

Manchester City's Sergio Aguero scores his side's second goal of the game during the Champions League Group C soccer match at the Etihad Stadium, Manchester, England, Tuesday Oct. 22, 2019. (Martin RickettPA via AP)

Manchester City's Sergio Aguero scores his side's second goal of the game during the Champions League Group C soccer match at the Etihad Stadium, Manchester, England, Tuesday Oct. 22, 2019. (Martin RickettPA via AP)

Manchester City's Sergio Aguero misses a scoring chance during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Manchester City's Sergio Aguero misses a scoring chance during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Manchester City's Rodrigo walks off the pitch during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Manchester City's Rodrigo walks off the pitch during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Atalanta's Ruslan Malinovskyi, center, celebrates with his teammates Papu Gomez, left, Remo Freuler after scoring on a penalty kick his side's first goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Atalanta's Ruslan Malinovskyi, center, celebrates with his teammates Papu Gomez, left, Remo Freuler after scoring on a penalty kick his side's first goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Atalanta's Ruslan Malinovskyi, left, celebrates with his teammates Papu Gomez, Remo Freuler and Robin Gosens after scoring on a penalty kick his side's first goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Atalanta's Ruslan Malinovskyi, left, celebrates with his teammates Papu Gomez, Remo Freuler and Robin Gosens after scoring on a penalty kick his side's first goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

City's victory lifted it five points clear at the top of Group C with three games still to play after Shakhtar Donetsk salvaged a 2-2 draw with Dinamo Zagreb in the other match.

Manchester City's Raheem Sterling holds the ball at the end of the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. Manchester City won 5-1 and Sterling score an hat trick. (AP PhotoDave Thompson)

Manchester City's Raheem Sterling holds the ball at the end of the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. Manchester City won 5-1 and Sterling score an hat trick. (AP PhotoDave Thompson)

However, there were a couple of negatives for City as midfielder Phil Foden was sent off for two bookable offences and Rodri hobbled off injured.

Manager Pep Guardiola also saw his team get off to a sluggish start which allowed Atalanta to make a lot of the early running.

Despite its poor record in the competition, Atalanta showed the attacking intent that has again lifted it to third in Serie A after finishing in that position last season.

Manchester City's Raheem Sterling, left, celebrates with his teammate Phil Foden after scoring his side's fourth goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Manchester City's Raheem Sterling, left, celebrates with his teammate Phil Foden after scoring his side's fourth goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

And the visitors took the lead after 28 minutes as Fernandinho brought Josip Ilicic down just inside the area and Malinovskyi sent Ederson the wrong way from the resulting spot kick.

City responded well and was back level within six minutes as Sterling ran across the edge of the box and clipped in a cross for Aguero to calmly tap past Pierluigi Gollini.

The hosts then stepped up a gear and soon claimed the lead with a penalty of their own — converted by Aguero — after Sterling was brought down by Andrea Masiello following another weaving run.

Manchester City's Raheem Sterling, right, scores his side's fifth goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. On the left is Atalanta's goalkeeper Pierluigi Gollini. (AP PhotoDave Thompson)

Manchester City's Raheem Sterling, right, scores his side's fifth goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. On the left is Atalanta's goalkeeper Pierluigi Gollini. (AP PhotoDave Thompson)

Atalanta offered little after the break and City took a firm grip on the game with a fine team goal just before the hour.

Riyad Mahrez released Kevin De Bruyne down the right and he burst into the area to feed Foden, who in turn teed up Sterling for an emphatic finish from six yards.

Sterling struck again soon after as he raced onto a defense-splitting pass by Ilkay Gundogan and wrongfooted a defender to fire home.

Manchester City's Raheem Sterling celebrates after scoring his side's third goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Manchester City's Raheem Sterling celebrates after scoring his side's third goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Remo Freuler put the ball in the net for Atalanta but was ruled offside before Sterling completed his treble by turning home an inviting cross by Mahrez.

City's night ended on a bad note as Foden, booked moments earlier for a foul, was shown a second yellow card for pulling back Atalanta midfielder Marten De Roon.

More AP soccer: https://apnews.com/Soccer and https://twitter.com/AP_Sports

Manchester City's Phil Foden, right, receives a red card by referee Orel Grinfeld during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Manchester City's Phil Foden, right, receives a red card by referee Orel Grinfeld during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Manchester City's head coach Pep Guardiola gestures from the bench during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Manchester City's head coach Pep Guardiola gestures from the bench during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Atalanta manager Gian Piero Gasperini gestures during the Champions League Group C soccer match at the Etihad Stadium, Manchester, England, Tuesday Oct. 22, 2019. (Martin RickettPA via AP)

Atalanta manager Gian Piero Gasperini gestures during the Champions League Group C soccer match at the Etihad Stadium, Manchester, England, Tuesday Oct. 22, 2019. (Martin RickettPA via AP)

Manchester City's Sergio Aguero scores his side's second goal of the game during the Champions League Group C soccer match at the Etihad Stadium, Manchester, England, Tuesday Oct. 22, 2019. (Martin RickettPA via AP)

Manchester City's Sergio Aguero scores his side's second goal of the game during the Champions League Group C soccer match at the Etihad Stadium, Manchester, England, Tuesday Oct. 22, 2019. (Martin RickettPA via AP)

Manchester City's Sergio Aguero misses a scoring chance during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Manchester City's Sergio Aguero misses a scoring chance during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Manchester City's Rodrigo walks off the pitch during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Manchester City's Rodrigo walks off the pitch during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Atalanta's Ruslan Malinovskyi, center, celebrates with his teammates Papu Gomez, left, Remo Freuler after scoring on a penalty kick his side's first goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Atalanta's Ruslan Malinovskyi, center, celebrates with his teammates Papu Gomez, left, Remo Freuler after scoring on a penalty kick his side's first goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Atalanta's Ruslan Malinovskyi, left, celebrates with his teammates Papu Gomez, Remo Freuler and Robin Gosens after scoring on a penalty kick his side's first goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)

Atalanta's Ruslan Malinovskyi, left, celebrates with his teammates Papu Gomez, Remo Freuler and Robin Gosens after scoring on a penalty kick his side's first goal, during the group C Champions League soccer match between Manchester City and Atalanta at the Etihad Stadium in Manchester, England, Tuesday, Oct. 22, 2019. (AP PhotoDave Thompson)