Police say an Austrian attacker was shot and killed by the guard he wounded outside the Iranian ambassador's residence in Vienna.
The soldier, who was standing guard outside the building, suffered a wound to his upper arm in the attack.
He noted there are speculations and word of mouth that the attacker was a foreigner, but had Austrian nationality.
Iran has called for a speedy probe into a "suspicious" attempt to launch a knife attack on the residence of Tehran's ambassador to Vienna, saying the motive behind the incident remains unknown.
The country's Ministry of Defence said the solider used pepper spray to try and stop the attack but was then forced to use his gun.
He was believed to have fired his weapon at least four times.
The attack comes days after an unrelated string of knife attacks last week, in which a 23-year-old Afghan national admitted to a series of knife attacks in the city which left four people seriously injured.
Police ordered reinforcements around all diplomatic missions in the Austrian capital, which is also home to many global organisations.