Manchester City staged a superb comeback to end Bayern Munich's record run of 10 consecutive Champions League wins but they still finished as Group D runners-up behind the German champions.

Bayern were dominant early on as Thomas Muller struck from Dante's pass before Mario Gotze scored following a corner.

David Silva pulled a goal back from close range after Jesus Navas's cross.

Aleksandar Kolarov equalised with a penalty after James Milner was tripped before Milner's fine finish won it.

Bayern suffer Brit panic

Bayern's last three home defeats in European competition have come against English clubs - Manchester City, Arsenal and Chelsea

It was an amazing turnaround from Manuel Pellegrini's side, who almost earned the 4-2 victory they needed to go through as group winners as Alvaro Negredo had a late effort saved by Bayern goalkeeper Manuel Neuer.

But after Bayern scored twice in the opening 12 minutes, the fact City fought back to claim an unexpected victory will give them confidence as they progress to the last 16 for the first time.

Although Bayern and City both finished with 15 points, the German side's 3-1 win during the first group game in Manchester meant their better goal difference proved crucial.

Both teams had already qualified before this game but Bayern boss Pep Guardiola was clear that finishing second in the group - and thus facing a seeded team in the first knockout round - was "not an option".

But his team looked vulnerable as they suffered only their third defeat of 2013 with Silva and Milner excellent throughout.

It started with the Germans in imperious form as City looked nervous after an early a mix-up between Joleon Lescott and recalled goalkeeper Joe Hart.

And after five minutes the visitors were undone as Dante's diagonal pass caught Kolarov napping and Muller nipped in behind the City captain to finish past Hart.

Hart had to save Dante's header and turned Ribery's effort onto the post after another Lescott mistake before Bayern went 2-0 up from the resulting corner.

Mario Mandzukic had time to shoot towards goal and his effort found Gotze, who also had space to stroke the ball past Hart from close-range.

By this stage, the only question was how many goals Bayern would score. Hart had made four touches, and two of them were to pick the ball out of the net.

Matters appeared to worsen when Micah Richards was replaced at right-back by Pablo Zabaleta after pulling a hamstring but the introduction of the experienced Argentine seemed to galvanise the visitors.

How could City have finished top?

  • When teams finish level on points in the Champions League, group positions are decided by head-to-head records - NOT goal difference
  • Bayern won 3-1 in Manchester in October
  • If Manchester City had won 4-2 in Munich, the sides would have taken three points off each other, and would have had a level goal difference in those games of +2
  • City would then have won the group above Bayern as both sides would have scored five goals in the two games, but City would have scored more goals away from home (four to three)

Source: Uefa CL regulations 

Shortly after a decent passage of play, City grabbed a goal back. Silva, on his return to the team after a calf injury, tucked in after Milner had headed Navas's right-wing centre back across goal.

After a frantic first half, City continued to improve but in the space of three minutes either side of the hour mark, the game then flipped on its head.

Silva was the architect as he played in Milner, who was brought down by Dante in the penalty area. Kolarov sent Neuer the wrong way from 12 yards.

Spanish midfielder Silva then set Navas free down the right and Milner curled a beautiful shot in at the back post after Bayern's Jerome Boateng had missed the cross,

Substitute Negredo could have made it a perfect night when Neuer saved his shot before Pellegrini chose to bring on Jack Rodwell instead of Sergio Aguero as they chased a fourth goal.

Whatever the group placings, this was an incredible way for City to flex their muscles before hosting Premier League leaders Arsenal on Saturday.

To see a gallery of images from today's Premier League games go to the BBC Sport Facebook page 

Lineup, Bookings (5) & Substitutions (5)

Bayern Munich

  • 01 Neuer
  • 21 Lahm
  • 27 Alaba
  • 06 Thiago Alcántara
  • 17 Boateng
  • 04 Dante Booked
  • 25 Müller
  • 19 Götze (Javi Martínez - 55' )
  • 09 Mandzukic (Shaqiri - 68' )
  • 39 Kroos
  • 07 Ribéry

Substitutes

  • 05 van Buyten
  • 08 Javi Martínez
  • 11 Shaqiri
  • 13 Rafinha
  • 14 Pizarro
  • 22 Starke
  • 26 Contento

Manchester City

  • 01 Hart
  • 02 Richards (Zabaleta - 16' Booked )
  • 13 Kolarov
  • 25 Fernandinho Booked
  • 26 Demichelis
  • 06 Lescott
  • 15 Jesús Navas
  • 14 Javi García
  • 10 Dzeko Booked (Rodwell - 88' )
  • 21 Silva (Negredo - 73' )
  • 07 Milner Booked

Substitutes

  • 04 Kompany
  • 05 Zabaleta
  • 09 Negredo
  • 16 Agüero
  • 17 Rodwell
  • 30 Pantilimon
  • 38 Boyata
Ref: David Fernández Borbalán

Match Stats

Shots

13 9

On target

6 6

Corners

14 0

Fouls

12 16

Live Text Commentary

Full time

Full Time Match ends, FC Bayern München 2, Manchester City 3.

90:00 +2:05 Full time

Full Time Second Half ends, FC Bayern München 2, Manchester City 3.

90:00 +1:26

Foul by Javi Martínez (FC Bayern München).

90:00 +1:26

Fernandinho (Manchester City) wins a free kick in the defensive half.

90:00 +1:10

Corner, FC Bayern München. Conceded by Pablo Zabaleta.

90:00 +0:15

Philipp Lahm (FC Bayern München) wins a free kick in the defensive half.

90:00 +0:15

Foul by James Milner (Manchester City).

89:40

Offside, Manchester City. James Milner tries a through ball, but Álvaro Negredo is caught offside.

88:34

Offside, FC Bayern München. Xherdan Shaqiri tries a through ball, but Dante is caught offside.

88:07

Corner, FC Bayern München. Conceded by Aleksandar Kolarov.

87:45 Substitution

Substitution Substitution, Manchester City. Jack Rodwell replaces Edin Dzeko.

86:06

Offside, FC Bayern München. Thiago Alcántara tries a through ball, but Thomas Müller is caught offside.

84:45

Thiago Alcántara (FC Bayern München) wins a free kick in the defensive half.

84:45

Foul by Fernandinho (Manchester City).

82:10 Booking

Booking Pablo Zabaleta (Manchester City) is shown the yellow card for a bad foul.

82:00

Franck Ribéry (FC Bayern München) wins a free kick on the left wing.

82:00

Foul by Pablo Zabaleta (Manchester City).

81:14

Attempt saved. Xherdan Shaqiri (FC Bayern München) left footed shot from outside the box is saved in the centre of the goal. Assisted by David Alaba.

80:33

Javi Martínez (FC Bayern München) wins a free kick on the right wing.

80:33

Foul by Edin Dzeko (Manchester City).

79:31

Attempt saved. Álvaro Negredo (Manchester City) right footed shot from the right side of the box is saved in the bottom left corner.

77:05 Booking

Booking Fernandinho (Manchester City) is shown the yellow card.

76:02

Foul by Toni Kroos (FC Bayern München).

76:02

Fernandinho (Manchester City) wins a free kick in the defensive half.

75:39

Corner, FC Bayern München. Conceded by Aleksandar Kolarov.

75:09

Corner, FC Bayern München. Conceded by Joleon Lescott.

74:32

Corner, FC Bayern München. Conceded by Pablo Zabaleta.

72:54

Foul by David Alaba (FC Bayern München).

72:54

Pablo Zabaleta (Manchester City) wins a free kick in the defensive half.

72:35 Substitution

Substitution Substitution, Manchester City. Álvaro Negredo replaces David Silva.

71:48

Corner, FC Bayern München. Conceded by Javi García.

70:51

Javi Martínez (FC Bayern München) wins a free kick in the defensive half.

70:51

Foul by Fernandinho (Manchester City).

70:01

Foul by Javi Martínez (FC Bayern München).

70:01

David Silva (Manchester City) wins a free kick in the defensive half.

68:12

Javi Martínez (FC Bayern München) wins a free kick in the defensive half.

68:12

Foul by Edin Dzeko (Manchester City).

67:51 Substitution

Substitution Substitution, FC Bayern München. Xherdan Shaqiri replaces Mario Mandzukic.

64:26

Attempt missed. Dante (FC Bayern München) header from the centre of the box misses to the left. Assisted by Toni Kroos with a cross following a set piece situation.

63:46

Thiago Alcántara (FC Bayern München) wins a free kick on the right wing.

63:46

Foul by Fernandinho (Manchester City).

61:51 Goal scored

Goal! Goal! FC Bayern München 2, Manchester City 3. James Milner (Manchester City) right footed shot from the left side of the box to the bottom right corner. Assisted by Jesús Navas with a cross.

60:16

Attempt missed. Toni Kroos (FC Bayern München) right footed shot from outside the box is close, but misses the top right corner. Assisted by Franck Ribéry.

59:39

Thiago Alcántara (FC Bayern München) wins a free kick in the attacking half.

59:39

Foul by Fernandinho (Manchester City).

58:15 Goal scored

Goal! Goal! FC Bayern München 2, Manchester City 2. Aleksandar Kolarov (Manchester City) converts the penalty with a left footed shot to the centre of the goal.

57:25

Penalty conceded by Dante (FC Bayern München) after a foul in the penalty area.

57:25

Penalty Manchester City. James Milner draws a foul in the penalty area.

56:47

Offside, FC Bayern München. Jerome Boateng tries a through ball, but Thomas Müller is caught offside.

55:40

Offside, Manchester City. Aleksandar Kolarov tries a through ball, but James Milner is caught offside.

54:42 Substitution

Substitution Substitution, FC Bayern München. Javi Martínez replaces Mario Götze.

52:23

Foul by Dante (FC Bayern München).

52:23

Edin Dzeko (Manchester City) wins a free kick in the attacking half.

51:47

Foul by Mario Götze (FC Bayern München).

51:47

David Silva (Manchester City) wins a free kick in the attacking half.

50:48

Attempt saved. Edin Dzeko (Manchester City) left footed shot from the centre of the box is saved in the bottom left corner. Assisted by David Silva.

49:32

Corner, FC Bayern München. Conceded by Pablo Zabaleta.

48:26

Foul by Mario Götze (FC Bayern München).

48:26

Javi García (Manchester City) wins a free kick in the defensive half.

46:44

Attempt blocked. Jesús Navas (Manchester City) right footed shot from outside the box is blocked. Assisted by Edin Dzeko.

45:18

Offside, FC Bayern München. Jerome Boateng tries a through ball, but Thomas Müller is caught offside.

45:00

Second Half begins FC Bayern München 2, Manchester City 1.

45:00 +1:28 Half time

Half Time First Half ends, FC Bayern München 2, Manchester City 1.

45:00 +1:26

Foul by Mario Mandzukic (FC Bayern München).

45:00 +1:26

Javi García (Manchester City) wins a free kick in the defensive half.

45:00 +1:03

Corner, FC Bayern München. Conceded by Martín Demichelis.

45:00 +1:01

Attempt missed. Thomas Müller (FC Bayern München) right footed shot from the right side of the box misses to the left. Assisted by Franck Ribéry with a through ball.

44:56

Corner, FC Bayern München. Conceded by Martín Demichelis.

44:54

Attempt blocked. Thomas Müller (FC Bayern München) right footed shot from the centre of the box is blocked. Assisted by Mario Mandzukic.

43:30 Booking

Booking James Milner (Manchester City) is shown the yellow card for a bad foul.

43:23

Thiago Alcántara (FC Bayern München) wins a free kick in the attacking half.

43:23

Foul by James Milner (Manchester City).

42:37

Attempt saved. Mario Götze (FC Bayern München) right footed shot from the left side of the six yard box is saved in the centre of the goal. Assisted by Franck Ribéry with a through ball.

41:20 Booking

Booking Edin Dzeko (Manchester City) is shown the yellow card for a bad foul.

41:15

Dante (FC Bayern München) wins a free kick in the defensive half.

41:15

Foul by Edin Dzeko (Manchester City).

39:59 Booking

Booking Dante (FC Bayern München) is shown the yellow card for a bad foul.

39:52

Foul by Dante (FC Bayern München).

39:52

Jesús Navas (Manchester City) wins a free kick on the right wing.

39:36

Attempt blocked. Mario Mandzukic (FC Bayern München) header from the centre of the box is blocked. Assisted by Philipp Lahm with a cross.

36:27

Foul by Mario Mandzukic (FC Bayern München).

36:27

Martín Demichelis (Manchester City) wins a free kick in the attacking half.

35:19

Corner, FC Bayern München. Conceded by Joleon Lescott.

33:52

Franck Ribéry (FC Bayern München) wins a free kick in the defensive half.

33:52

Foul by Pablo Zabaleta (Manchester City).

32:56

Offside, Manchester City. Joleon Lescott tries a through ball, but Edin Dzeko is caught offside.

32:36

Hand ball by Jerome Boateng (FC Bayern München).

29:04

Mario Mandzukic (FC Bayern München) wins a free kick in the attacking half.

29:04

Foul by Martín Demichelis (Manchester City).

28:42

Attempt missed. Jesús Navas (Manchester City) right footed shot from the right side of the box is close, but misses to the right. Assisted by David Silva.

27:29 Goal scored

Goal! Goal! FC Bayern München 2, Manchester City 1. David Silva (Manchester City) left footed shot from very close range to the centre of the goal. Assisted by James Milner with a headed pass.

25:16

Attempt missed. Fernandinho (Manchester City) left footed shot from outside the box is too high. Assisted by Edin Dzeko.

23:44

Corner, FC Bayern München. Conceded by Jesús Navas.

19:56

Attempt saved. Toni Kroos (FC Bayern München) right footed shot from outside the box is saved in the bottom right corner. Assisted by Mario Götze.

17:57

Attempt blocked. Franck Ribéry (FC Bayern München) right footed shot from the left side of the box is blocked.

17:27

Corner, FC Bayern München. Conceded by Joleon Lescott.

16:51

Franck Ribéry (FC Bayern München) wins a free kick in the defensive half.

16:51

Foul by Pablo Zabaleta (Manchester City).

15:20 Substitution

Substitution Substitution, Manchester City. Pablo Zabaleta replaces Micah Richards because of an injury.

14:36

Attempt saved. James Milner (Manchester City) right footed shot from the left side of the box is saved in the centre of the goal. Assisted by Edin Dzeko with a headed pass.

11:13 Goal scored

Goal! Goal! FC Bayern München 2, Manchester City 0. Mario Götze (FC Bayern München) right footed shot from the centre of the box to the bottom right corner following a corner.

11:11

Attempt blocked. Mario Mandzukic (FC Bayern München) right footed shot from the centre of the box is blocked. Assisted by Toni Kroos with a cross.

10:46

Corner, FC Bayern München. Conceded by Joe Hart.

9:22

Attempt saved. Dante (FC Bayern München) header from the centre of the box is saved in the bottom left corner. Assisted by Toni Kroos with a cross.

8:29

Franck Ribéry (FC Bayern München) wins a free kick on the right wing.

8:29

Foul by Joleon Lescott (Manchester City).

8:05

Offside, Manchester City. Micah Richards tries a through ball, but Jesús Navas is caught offside.

4:52 Goal scored

Goal! Goal! FC Bayern München 1, Manchester City 0. Thomas Müller (FC Bayern München) left footed shot from the centre of the box to the bottom left corner. Assisted by Dante with a through ball.

4:03

Franck Ribéry (FC Bayern München) wins a free kick on the left wing.

4:03

Foul by Micah Richards (Manchester City).

2:37

Corner, FC Bayern München. Conceded by Joleon Lescott.

1:36

Mario Mandzukic (FC Bayern München) wins a free kick on the left wing.

1:36

Foul by Jesús Navas (Manchester City).

0:00

First Half begins.

0:00

Lineups are announced and players are warming up.

Live data and text provided by our data suppliers