Germany's Mario Gomez scored in the first half to secure a 1-0 win over a stubborn Northern Ireland side and a place in the last 16 of Euro 2016 as Group C winners.
The world champions dominated the game at Parc des Princes and had created several chances when Gomez, starting his first match in the tournament, earned the points with a deflected effort from inside the box on the half-hour.
Germany advance from the section with seven points from three games and a better goal difference than Poland, who beat already-eliminated Ukraine 1-0 to qualify in second place.
Northern Ireland, making their first appearance at a European Championship, finished third on three points and may still reach the knockout stage as one the four best third-placed teams although their fate is out of their hands.
Jakub Blaszczykowski's goal gave Poland a 1-0 win over Ukraine and sent them into the knockout stages of the tournament for the first time.
The substitute struck nine minutes after coming on at halftime to ensure Poland finished second in the standings on seven points, level with Germany, and they will play Switzerland in the last 16.
Blaszczykowski received the ball on the right side of the penalty area and cut inside cleverly before hitting a sweet left-foot shot into the far corner of the net.
Ukraine finished bottom of the group with no points.