An unknown attacker armed with a knife was shot and killed by soldiers guarding the Iranian ambassador's residence in Vienna.

One guard suffered a cut to the upper arm during the attack at about 23:35 local time (00:35 GMT) on Sunday and has been sent to hospital, police said.

A police spokesman told AFP news agency that the attacker, a 26-year-old Austrian, "died on the spot".

An investigation is under way. The motive for the attack is not yet clear.

A spokesman for Vienna city police, Harald Soeroes, said the soldier had attempted to defend himself with pepper spray and a struggle had taken place between the two men.

At least four shots had been fired.

Iran's foreign ministry spokesman, Bahram Ghasemi, said Ambassador Ebadollah Molaei was unharmed.

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 have ordered further security for all diplomatic missions in Vienna.