The Czech Republic came into the contest knowing that only a win would do, while Turkey knew that a point would be enough to secure their spot in the last 16.
Ivan Hasek's side were forced to play the majority of the contest with 10 men after Antonin Barak was given his marching orders in the 20th minute for two bookable offences - the second of which appeared to be harsh as Barak played the ball before his follow through was deemed to be worthy of a yellow card.
The Czech Republic managed to keep Turkey at bay until the break, but their valiant resistance was ultimately broken by Hakan Calhanoglu's 51st-minute piledriver.
Vincenzo Montella's side appeared to be in control until West Ham United's Tomas Soucek netted a 66th-minute equaliser to give his side and the Czech supporters some much-needed hope.
Czech Republic showed great grit and determination, but their fading hopes of claiming a remarkable victory were quashed by Cenk Tosun's 94th-minute winner.
The former Everton man cut inside onto his favoured right foot before picking out the far corner with an unstoppable finish, ensuring his country could celebrate a narrow win and a second-place finish in Group F.
Barak sees red to make unwanted Euros history
Following an even start to the contest, the complexion of the game completely changed when Barak received the earliest red card in European Championship history.
The Fiorentina attacker was given the chance to make his first start of the tournament after featuring as a substitute in the defeat to Portugal and the 1-1 draw against Georgia.
However, his evening ultimately ended prematurely after he received two yellow cards in the space of nine minutes.
Barak rightly received his first yellow for a shirt pull, but there was debate surrounding whether he deserved a second yellow and the subsequent red.
Referee Istvan Kovacs ruled that caution was a suitable punishment despite Barak initially playing the ball before he stepped on the Borussia Dortmund midfielder in his follow-through.
Calhanoglu, Tosun send Turkey through
Turkey may have been frustrated to go into the break on level terms, but that soon changed in the opening stages of the second half.
Kenan Yildiz saw his initial effort smartly saved by goalkeeper Jindrich Stanek, who picked up an injury in the process of diving to his right.
Turkey kept the ball alive from Stanek's stopped, and they eventually worked it to Calhanoglu on the left side of the box.
The Inter Milan midfielder needed no second invitation to rifle a driven right-foot shot into the far corner to register his 19th international goal.
The contest appeared to be heading towards a draw when Soucek cancelled out Calhanoglu's opener, but Tosun came off the bench to become Turkey's hero.
Tosun took a few touches to cut inside onto his right foot before sending a driven shot into the bottom corner to seal Turkey's second win of the tournament.
Czech Republic threaten an unlikely turnaround
The Czech Republic may have conceded late on, but they threatened to spark a turnaround when Soucek pulled his country level.
A long throw wreaked havoc in the box and while Tomas Chory saw his initial shot cleared off the line, Soucek was on hand to fire home the rebound to spark jubilant scenes among the Czech contingent.
Soucek's first-ever European Championship goal gave his country some semblance of hope, knowing that they would progress if they found the winning goal.
Despite battling to the end, the contest ultimately ended in defeat, ensuring they finished bottom of Group F with just one point to their name.
Turkey set up Austria clash
While the Czech Republic crashed out of the tournament, Turkey can now look forward to Tuesday's last-16 game against Austria in Leipzig.
Surprisingly, Austria claimed six points from three matches to top a group that contained France and the Netherlands, demonstrating that it will be a tricky test for Montella's charges.
However, Turkey may view the game as a great opportunity to reach the quarter-finals where they would face either Romania or the Netherlands.