"It appears to have been a terror attack," Interior Minister Karl Nehammer told public broadcaster ORF, adding that the assailants were armed with rifles. He said the army had been asked to guard key locations in the city to allow police officers to pursue the attackers.
Vienna Mayor Michael Ludwig said 15 people were hospitalised, seven with serious injuries.
Oskar Deutsch, the head of the Jewish community in Vienna, said that the shooting took place in the street outside the city's main synagogue but that it wasn't clear whether the house of worship had been targeted. The synagogue was closed at the time, Deutsch tweeted.
Rabbi Schlomo Hofmeister said he saw at least one person shoot at people sitting outside at bars in the street below his window.
"They were shooting at least 100 rounds just outside our building," Hofmeister said.
"All these bars have tables outside. This evening is the last evening before the lockdown," he added. "As of midnight, all bars and restaurants will be closed in Austria for the next month, and a lot of people probably wanted to use that evening to be able to go out."
Kurz said these were "difficult hours for our republic" and vowed: "Our police will act decisively against the culprits of this despicable terror attack."
French President Emmanuel Macron tweeted that the French "share the shock and grief of the Austrian people hit by an attack tonight."
"After France, this is a friendly country that has been attacked. This is our Europe ... We will not give in," he wrote.
France has endured three attacks blamed on Muslim extremists in recent weeks: one by a Pakistani refugee that wounded two people outside satirical newspaper Charlie Hebdo's old headquarters; the beheading of a schoolteacher who showed students caricatures of the Prophet Muhammad; and a deadly knife attack on Thursday in a church in the Mediterranean city of Nice. France has gone on maximum security alert.
Authorities in Vienna urged people to avoid all open spaces and public transportation. Police said trams and buses weren't stopping and urged social media users not to post videos of the police operation so as not to endanger officers.
- AP