Burak Yilmaz and Ozan Tufan strikes gave Turkey a 2-0 win over the Czech Republic that also sent Northern Ireland into the last 16 of Euro 2016.
Turkey's first points of the tournament, in their final Group D game in Lens, also gave them hope of progressing to the next stage as one of the best third-placed teams.
After defeats by Croatia and Spain, Turkey knew they would have to win by at least two goals to keep their tournament alive. They achieved that with strikes in each half from Yilmaz and Tufan.
Had they scored four they would have gone through immediately but, while they must now wait on other results, Northern Ireland can prepare for the knockout stages. The Czechs, meanwhile, slipped to the bottom of the group and will head home.
Turkey's victory was deserved but hard-earned. The Czechs made a positive start but were caught on the break after just 10 minutes as Turkey seized a loose ball.
Emre Mor, the highly-rated 18-year-old winger signed by Borussia Dortmund earlier this month, raced away down the touchline and clipped the ball into the box. Yilmaz got himself ahead of Tomas Sivok and neatly turned the ball in at the near post.
The Czechs were not ruffled and went close to a quick equaliser when Sivok headed against the post from a corner. Further Czech chances came as Pavel Kaderabek got behind the defence only to shoot at goalkeeper Volkan Babacan's feet and Tomas Necid flicked another opportunistic volley wide.
At the other end Mor, seizing his chance to impress on his first start of the tournament, flashed a shot wide from a tight angle.
The Czechs again went close to an equaliser before the interval as Necid headed across goal following a poor Turkish clearance but Kaderabek was unable to turn in at the far post. Jaroslav Plasil also tried his luck with a shot from outside the area but Babacan saved comfortably.
There was a hold-up early in the second half after three players were hurt in an accidental clash of heads in the Turkey area. Gokhan Gonul was the worst affected following the collision involving Sivok and David Pavelka, requiring treatment for a nasty cut close to the eye.
When play resumed Turkey were the next to threaten as Mor shot over but Babacan was soon in action too when Vladimir Darida tested him.
Turkey doubled their lead midway through the second half after the Czechs failed to deal with a free-kick into the area by Selcuk Inan. The ball found its way to the feet of Mehmet Topal and he laid off for Tufan to smash a shot into the top corner. As has been common throughout the tournament, flares were set off by fans amid the Turkish celebrations.
The Czechs tried to fight back with Darida twice forcing Babacan to save, while Turkey continued to chase more goals and Olcay Sahan seized on poor defending to fire wide late on..
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies