Raheem Sterling celebrated his 21st birthday with two goals as Manchester City scored three times in the last 10 minutes to sink Borussia Moenchengladbach 4-2 and finish top of Champions League Group D on 8 December.

City, without captain Vincent Kompany and talisman striker Sergio Aguero, took the lead in the 16th minute when Sterling fed David Silva with a clever backheel in the box and the Spain playmaker drove home a bullet shot. Gladbach, in confident mood after inflicting Bayern Munich's first Bundesliga defeat of the season at the weekend, then took command with their slick passing style and were 2-1 up by halftime.

Julian Korb equalised with a right-foot shot in the 19th minute, after a surging run from Fabian Johnson, before Brazilian Raffael scrambled the ball home from close range in the 42nd following another neat passing move.

City, who had never finished top of a Champions League group before, perked up after the break and it was no surprise when Sterling converted from close range after Gael Clichy pulled the ball back from the byline in the 80th minute. A minute later substitute Wilfried Bony set Sterling up and the former Liverpool forward provided a delightful curling effort from 16 metres.

Bony made it 4-2 from a left-wing cross by Aleksandar Kolarov in the 85th minute as City, who had already clinched their place in the knockout stages, ended the group stage with 12 points from six games. City manager Manuel Pellegrini said he was delighted with the contribution of the birthday boy.

"It is his birthday, he is 21 years old, and before the game I think that the minimum he has to do is score two goals, and he did it," joked the Chilean after the match.

Having seen a poor performance from his side in the 2-0 loss to Stoke City in the Premier League at the weekend, Pellegrini was also pleased to see his team attack with the verve and energy he demands.

"For me I think the most important thing – of course I am very happy about winning the group – but the most important thing is that we returned to being the team that I want to see normally playing in that way," said Pellegrini

Juventus, who were beaten 1-0 at Sevilla, also qualified for the Champions League last 16 on 11 points. Although former Malaga boss Pellegrini is pleased he can avoid European heavyweights such as Barcelona and Bayern Munich in the next round, he says it will not be plain sailing through to the quarter-finals whoever they face.

"It is better to finish first because you can avoid important teams, important teams for just one stage more, the round of 16. After that, if you want to win the title you have to play against bigger teams. I always say the example of when I was in Malaga and everyone wanted Malaga and Malaga continued," said Pellegrini, who took Malaga to the quarter-finals in 2013.

"So it is very important in the moment that you arrive at the round of sixteen that of course it is better not to play at this stage with Barcelona, with Bayern, with Real Madrid. But that doesn't mean that you are in the next stage because you don't play against those teams. It is important to play as well as we did in the second half, in Europe, and we have to play [like that] against every team."