A goal deep in added time from Oscar Hiljemark secured a UEFA European Under-21 Championship play-off place for Sweden.
Before kick-off, Sweden and Turkey both trailed Poland by two points. Sweden could only win the section by beating Turkey and hoping Poland lost in Greece. Poland did lose, but Sweden had a 3-1 lead from Kristoffer Olsson's hat-trick wiped out before Hiljemark secured first place in qualifying Group 7 and a berth in Friday's draw.
"We played as a team, we know anybody could be the decisive player," Hiljemark said while team-mate John Guidetti, dancing in front of media after the game, added: "You think it's over, but you continue to struggle anyway. It helped us today."
The first half was tight and Turkey struck on 29 minutes through a fine Emrah Bassan effort, though Sweden soon equalised after Kiese Thelin headed against the woodwork and Hiljemark's shot was touched in by Olsson. Sweden led just before the hour when Olsson chipped Ömer Kahveci after the Turkey goalkeeper's clearance hit Guidetti.
On 71 minutes Olsson's third seemed to have sealed it, the Arsenal FC midfielder shooting in from outside the box after being set up by Hiljemark. But Turkey fought back and two substitutes brought them level, Kerim Koyunlu volleying superbly over Patrik Carlgren and Enes Ünal, sent clear by Kerim, calmly beating the Sweden No1.
Now Turkey had a chance if they could score again but instead the Sweden captain had the final word, shooting in unmarked two minutes into added time to break the hearts of Greece, who seemed to have clinched the group.