The win gave Austria 22 points from eight matches and guaranteed them first place in Group G.
Harnik netted a goal in each half, David Alaba chipped in a first-half penalty and Marc Janko also got on the scoresheet before Zlatan Ibrahimovic grabbed a late consolation for Sweden.
Waving flags and sporting T-shirts saying 'France, we're coming', the Austrian players ran to celebrate with the thousands of travelling fans, shaking hands and singing long after the final whistle.
Euro Qualifying
Paul Parker picks his 23: No place for Danny Rose
30/03/2016 AT 15:15
Sweden's best first-half chances came through two free kicks from Ibrahimovic while Marcus Berg went close for the home team in the second period.

Austria's Aleksandar Dragovic and Sweden's Zlatan Ibrahimovic (R) are seen during the Euro 2016 Group G qualifier in Stockholm, Sweden, September 8, 2015.

Image credit: Reuters

Robert Almer also had to make a double save from Berg and Emil Forsberg late on before Ibrahimovic finally broke through.
[STORY: FORTUNATE SPAIN EDGE MACEDONIA TO TOP GROUP C]
Sweden, however, were sunk by Austria's dangerous breaks as the visitors went forward at pace throughout, often throwing five or six players into counter attacks.
Austria meet Montenegro and Liechtenstein in their final two qualifying games.
In the other matches in Group G, Russia hammered Liechtenstein 7-0 to leapfrog Sweden into second place with 14 points, while Moldova were beaten 2-0 at home by Montenegro.
In Group E, San Marino scored their first away goal for 14 years but were edged out 2-1 by Lithuania and Slovenia beat Estonia 1-0 to replace them in third place, three points behind Switzerland.
Spain are on the brink of qualifying for the tournament from Group C after a lucky own goal from goalkeeper Tome Pacovski, while Belarus beat Luxembourg 2-0 and Slovakia drew 0-0 with Ukraine to keep their three-point cushion in second place.
Euro Qualifying
Ukraine get one-game stadium ban from UEFA for racism
27/11/2015 AT 19:32
Euro Qualifying
Ibrahimovic on Denmark: ‘I sent their entire country into retirement’
18/11/2015 AT 08:56