Greece recorded a thrilling 4-3 Group F victory over Hungary, who now head to the Euro 2016 playoffs.
Defender Kostas Stafylidis gave Greece an early lead, firing home after five minutes.
Hungary responded through Gergo Lovrencsics, who was released by Leandro to send a 26th-minute effort beyond Greece keeper Orestis Karnezis.
Bernd Stock's side took the lead not long after half time as Kansas City striker Krisztian Nemeth was sent clear by Akos Elek to shoot past Karnezis.
Moments later, Greece levelled the tie through Panagiotis Tachtsidis, who latched onto Petros Mandalos' through ball before firing past Hungary stopper Gabor Kiraly.
Substitute Zsolt Kalmar made an immediate impact on the tie by providing the assist for Nemeth's second as Hungary once again retook the lead with 75 minutes of the tie expired.
Kostas Mitroglou provided Greece with a second leveller, hitting the net from fellow goalscorer Tachtsidis' assist.
Caretaker manager Kostas Tsanas then saw his side go ahead with five minutes remaining as substitute Panagiotis Kone fired home the winning goal.
Greece bow out of Group F with seven points after Sunday's win, while Hungary will go into the playoffs for the last four Euro 2016 spots.