Austria, who were undefeated in their 10 qualifying games, lost 2-0 to long-standing rivals Hungary in the opening match of Euro 2016 Group F on Tuesday.
The Hungarians, who only reached the finals through the playoffs, took the lead with a rare goal by forward Adam Szalai in the 62nd minute -- his first at international level since October 2014.
Austria thought they had equalised soon after but Martin Hinteregger's effort was disallowed for a foul by Aleksandar Dragovic who was sent off after receiving a second yellow card.
Substitute Zoltan Stieber secured victory three minutes from the end.
In front of two of the noisiest sets of supporters yet seen at the tournament, Austria were the better side in the first half.
David Alaba, the country's player of the year in 2015 for the fifth time in succession, looked as though he could be the game's dominant figure from the first minute when he burst forward and hit a fierce drive against the post from 20 metres.
Goalkeeper Gabor Kiraly, the first 40-year-old to play at a European Championship, was beaten on that occasion but made an excellent save from Zlatko Junuzovic 10 minutes before halftime.
Despite Zoltan Gera's long crossfield passes that were opening up play, Hungary were restricted to shots from distance until Laszlo Kleinheisler handed their only real first-half chance to captain Balazs Dzsudzsak who pulled it across goal.
The game then turned on two incidents within as many minutes just after the hour.
Szalai, nobody's idea of a prolific scorer, took a return pass from Kleinheisler and slid the ball past previously untroubled goalkeeper Robert Almer.
Austria retaliated almost immediately as Hinteregger's shot beat Kiraly but the referee ruled it out for a late tackle by Dragovic who had been yellow-carded in the first half.
Two substitutes combined late in the game to clinch an unexpected victory in the 137th meeting between the two sides dating back to 1902.
Tamas Priskin, who had replaced scorer Szalai, sent Stieber racing through to grab the second goal in front of thousands of delighted Hungarians.
Once a sizeable force in world football, the team have been in the doldrums for a long while.
Having qualified for the first time since reaching the 1972 semi-finals, they are now well placed to reach the last 16.
Euro 2016: Points Table
India joining NSG will set off nuclear confrontation: China
Hungary hungry to show Euro qualification was no fluke