Substitute Marcel Sabitzer scored in the second minute of injury time as Austria ended Montenegro's Euro 2016 qualification hopes with a 3-2 victory at the Stadion Pod Goricom.
Montenegro twice went ahead through strikes from captain Mirko Vucinic and Fatos Beciraj, but unbeaten Group G leaders Austria, who have already sealed their place in France next summer, drew level thanks to Marc Janko and Marko Arnautovic, the latter on 81 minutes.
Sabitzer, an 83rd-minute substitute, then struck in added time, after Vucinic had seen red, to leave Montenegro four points adrift of Sweden, who occupy the group's play-off spot, with one game remaining.
Austria came into the clash having won their last seven group matches.
Despite having nothing to play for, they dominated the early stages in Podgorica and only a fine save from Montenegro goalkeeper Vukasin Poleksic kept out Sebastian Prodl's header.
It was the hosts who took a 32nd-minute lead though, as Nikola Vukcevic's splendid ball over the top saw Vucinic scuff home.
Austria levelled 10 minutes after half-time when Janko bundled the ball in at the back post from Martin Harnik's cross along the six-yard area.
While Montenegro re-established their lead through Beciraj, who fired home after Austria had failed to clear their lines from a corner, the visitors pulled level once more thanks to a fine solo goal from Arnautovic.
The Stoke winger dribbled the width of the Montenegro box nine minutes from time before rifling low back across Poleksic.
There was more drama to come as Vucinic was red carded for dissent before Sabitzer won it in added-on time with a thunderous strike on the edge of the box after the ball had broken kindly for him.