Match ends, Northern Ireland 0, Germany 1.
Northern Ireland were beaten by world champions Germany but still advanced to the last 16 of Euro 2016 after the Czech Republic's 2-0 defeat by Turkey.
Germany wasted several chances before and after Mario Gomez scored the game's only goal in Paris.
The Czechs' loss meant Northern Ireland go through as one of four best third-placed teams as they have a better record than Albania and Turkey.
Michael O'Neill's side will face Wales or hosts France in the last 16.
Northern Ireland finished the group stage with three points, the same number as Albania and Turkey, but boast a better goal difference than their rivals.
They have reached the knockout stages of a major tournament for just the third time in their history.
Clinging on - and going through
Despite losing, Northern Ireland's fans were in boisterous mood as they stayed inside the Parc des Princes long after the final whistle.
The players were given a rousing reception by the fans in green shirts who sang themselves hoarse from the start of the match.
They looked in trouble early on when Germany - who win Group C ahead of Poland on goal difference - created a number of golden opportunities.
But resolute defending, outstanding goalkeeping and a bit of luck saw NI's defence breached on just the one occasion.
McGovern keeps goal difference healthy
O'Neill's side would have suffered a heavier defeat but for the heroics of Michael McGovern.
The keeper, who is out of contract after two years at Hamilton, pulled off a series of magnificent saves and has never conceded more than one goal in any of his 14 appearances for his country.
But another fine record - Northern Ireland having let in just one first-half goal in their last 22 matches - did not survive at the Parc des Princes.
Their resistance was broken by the recalled Gomez, who struck his 28th international goal, turning in Thomas Muller's touch from 10 yards out.
Germany could easily have been out of sight by the break, McGovern making some fine stops and Muller heading against the base of the post and seeing a shot strike the crossbar.
The world champions never looked like surrendering their lead, and should really have added to it early in the second half.
Mario Gotze was thwarted by another superb save by McGovern while the well-positioned Gomez was wasteful at the near post.
Just nine of Germany's 28 shots were on target and McGovern's eight saves kept his side's goal difference at level for the tournament, which proved key in their qualification.
Man of the match - Michael McGovern
What they said...
Northern Ireland goalkeeper Michael McGovern: "I was busy but it was mentally very hard - I'm immensely proud. We knew every goal was crucial so wanted to keep keep it at one and maybe nick a goal of our own.
"Germany had a slow start but they were excellent today, we could not get out. I've never had such a busy night and I've never played against such quality opposition."
Northern Ireland manager Michael O'Neill: "Nobody sets up their team to just defend but you look at the Germany team and you see Bayern, Real Madrid and so on… it's not in my nature to set the team up to lose 7-0. But we earned the right to be here. I'm immensely proud that we are even playing here against the world champions in Paris.
"We knew the group would be difficult. What we saw tonight was a team that refused to be beaten by a big margin and did everything possible to stay in the game.
"Over the three games we deserve to be in the last 16. What we went through tonight will prepare us for anything in the next round and our players will be ready for whoever."
The stats you need to know
- Northern Ireland completed 110 passes against Germany, 11 fewer than Toni Kroos (121)
- Only the Republic of Ireland have completed fewer passes in a Euro finals game since 1980 (v Netherlands in 1988 - 102 passes)
- Bastian Schweinsteiger made his 15th appearance for Germany at the European Championship, more than any other German player
- Mesut Ozil misplaced just one of his 68 passes against Northern Ireland (98.5% accuracy)
- 19WardSubstituted forMagennisat 70'minutes
- 13EvansSubstituted forMcGinnat 84'minutes
- 11WashingtonSubstituted forLaffertyat 59'minutes
- 17BoatengSubstituted forHöwedesat 76'minutes
- 6KhediraSubstituted forSchweinsteigerat 69'minutes
- 19GötzeSubstituted forSchürrleat 55'minutes
- 22ter Stegen
- Clément Turpin
- Shots on Target
Second Half ends, Northern Ireland 0, Germany 1.
Foul by Thomas Müller (Germany).
Kyle Lafferty (Northern Ireland) wins a free kick in the defensive half.
Attempt missed. Mesut Özil (Germany) right footed shot from the right side of the box is close, but misses to the right. Assisted by Thomas Müller with a headed pass.
Corner, Germany. Conceded by Steven Davis.
Attempt saved. Mario Gomez (Germany) left footed shot from outside the box is saved in the centre of the goal. Assisted by Thomas Müller.
Attempt missed. Jonas Hector (Germany) left footed shot from outside the box is high and wide to the left following a corner.
Corner, Germany. Conceded by Stuart Dallas.
Substitution, Northern Ireland. Niall McGinn replaces Corry Evans.
Attempt missed. Mesut Özil (Germany) left footed shot from outside the box is just a bit too high. Assisted by Joshua Kimmich.
Corner, Germany. Conceded by Michael McGovern.
Attempt saved. Mario Gomez (Germany) header from the centre of the box is saved in the bottom right corner. Assisted by Joshua Kimmich with a cross.
Bastian Schweinsteiger (Germany) wins a free kick in the defensive half.
Foul by Josh Magennis (Northern Ireland).
Foul by Thomas Müller (Germany).
Jonny Evans (Northern Ireland) wins a free kick on the left wing.
Foul by Mario Gomez (Germany).
Gareth McAuley (Northern Ireland) wins a free kick in the defensive half.
Offside, Northern Ireland. Steven Davis tries a through ball, but Kyle Lafferty is caught offside.