At least two people were killed, with several wounded, when attackers opened fire in six central locations — including one near a synagogue — at around 8 pm (1900 GMT).
Witnesses said they saw a man shoot “like crazy” with what appeared to be an automatic weapon, before police arrived and opened fire.
“They looked like firecrackers, then we realized that they were gunshots,” said one witness on public broadcaster ORF.
With one assailant shot dead, the city’s mayor urged people to remain indoors as police said a huge manhunt was underway for one of the attackers.
Vienna had until now been spared the sort of major attacks that have hit other European countries, with France experiencing two terror attacks only last month.
“We are dealing with a terror attack the severity of which, thank God, we have not experienced in Austria in many years,” the city’s mayor Michael Ludwig said at press conference early Tuesday.
“At the beginning, I thought to myself that maybe we were making an American film or that they had drunk too much,” said waiter Jimmy Eroglu, 42.
But then he heard shots. “The police came in and said, ‘you all have to stay inside because there’s a probably a dead man there’.”
Vienna’s police repeatedly urged residents to shelter in place as the manhunt got underway, with helicopters sweeping the skies above the city and officers hastily erecting cordons on streets that only hours earlier were thronged with people enjoying a last drink before lockdown.
Robert Schneider, who lives in central Vienna, left his house briefly and found two lasers trained on his chest.
“Hands up, take off your jacket,” officers shouted at him, the 39-year-old told AFP. “We had seen nothing, heard nothing. We are in shock.”
Gernot Gruber, 25, said he initially thought the sounds were fireworks set off by people ahead of the lockdown.
“If you hear these noises in Austria you don’t think they’re gunshots, you really don’t,” he told the Guardian newspaper.
Gruber, en route to the Hard Rock cafe around the corner from one of the sites of the attacks, said he had heard about similar incidents in other countries.
“But I’ve never been close to one. It was really frightening.”