A security perimeter was set up outside the Iranian ambassador's residence in Vienna (AFP)
A 26-year-old Austrian was shot dead outside the Iranian ambassador's residence in Vienna after a knife attack on a soldier guarding the building, police said on Monday.
The assailant, who police said was of Egyptian origin, "died on the spot" after the soldier opened fire, police spokesman Harald Soeros told AFP, saying the attack occurred just before midnight (2300 GMT).
Police were searching the assailant's home to try and understand what was behind the attack, with Soeros saying they had "not ruled out, nor confirmed" any terrorist motivation.
The incident took place in a residential neighbourhood when the soldier was on duty at a security booth.
During the attack, the two men wrestled on the ground and the attacker stabbed the soldier "countless times," Soeros told AFP, saying his life was saved by the security vest he was wearing.
During the attack, the two men wrestled on the ground and the attacker stabbed the soldier 'countless times'
He had initially tried to use pepper spray to immobilise his attacker but later used his gun, firing "at least four bullets", Soeros said.
The soldier escaped relatively unscathed, with a wound to his upper arm for which he was treated in hospital. He was also suffering from shock.
Vice Chancellor Heinz-Christian Strache said the soldier had fired "in legitimate self-defence" and had acted "in an appropriate manner, saving his own life".
Police have ordered reinforcements around all diplomatic missions in the city.
The incident comes just days after two knife attacks in Vienna, including one that left a couple and their 17-year-old daughter with severe injuries.
A 23-year-old Afghan national confessed to those assaults but denied any political motive.