Video report by ITV News Security Editor Rohit Kachroo
A gunman who left four people dead and injured at least 22 others in a terror attack in the Austrian capital of Vienna was jailed last year for attempting to travel to Syria and join the so-called Islamic State.
The suspect was shot dead by police on Monday night.
Interior Minister Karl Nehammer said the 20-year-old held dual citizenship of Austria and North Macedonia.
Mr Nehammer said the attacker was sentenced to 22 months in prison in April 2019 because he had tried to travel to Syria to join the terrorist group and he was granted early release in December under juvenile law.
Tributes have been made to the victims by members of the Austrian government
The attacker was armed with a fake explosive vest, a Kalashnikov, an automatic rifle, a handgun and a machete, Mr Nehammer confirmed.
Officials in Vienna say they are trying to determine whether the attacker was acting alone or not.
After initial speculation of more gunmen being involved in the attack, Mr Nehammer said by mid-afternoon they had "found no evidence of a second perpetrator," but did not rule out the possibility.
The gunman attacked six locations in the centre of the city, shortly after 8pm local time on Monday, starting outside the main synagogue.
Witnesses described shots being fired into crowds in bars with automatic rifles, as many people took advantage of the last evening before a nationwide Covid-19 curfew was introduced.
Vienna police chief Gerhard Puerstl said the attacker was killed at 8.09pm.
Two women and two men died during the attack. One of the women was a German woman, Germany's Foreign Minister has confirmed.
A police officer was injured during the line of duty but is no longer in a critical condition.
Austrian Chancellor Sebastian Kurz said: “It was an attack out of hatred — hatred for our fundamental values, hatred for our way of life, hatred for our democracy in which all people have equal rights and dignity.”
Mr Nehammer said 18 house searches have taken place and 14 people have been arrested.
Resident Natascha Strobl describes the scene from the Austrian capital
Community Rabbi Schlomo Hofmeister told ITV News described what he saw from his window during the attack.
He said: "I heard gunshots from down the street and I looked out of the window and saw the armed attacker shooting at the guests of various bars and restaurants, which are lined up along the street."
"It took a few moments to realise what was going on because in the first instance you know you don't think about a terror attack, you don't think about someone shooting.
"The first impression was playing around with fireworks and I had the feeling some of the people sitting in the same bars had the same thoughts," Rabbi Hofmeister added.
Some of the circumstances are reminiscent of the case of Usman Khan, who stabbed two people to death in 2019 in central London.
Khan had been sentenced to 16 years in prison after being convicted for his role in a plot to bomb the London Stock Exchange.
He was released in December 2018 after serving half his sentence, as are most prisoners in the UK.
While in prison, Khan had begun working with a program that seeks to rehabilitate criminals through storytelling and workshops.
The attack drew swift condemnation and assurances of support from leaders across the world.
Both Prime Minister Boris Johnson and Home Secretary Priti Patel have tweeted to express solidarity with Austria after the deadly attack.
Mr Johnson said on Monday: "I am deeply shocked by the terrible attacks in Vienna tonight.
"The UK’s thoughts are with the people of Austria – we stand united with you against terror."
While French President Emmanuel Macron, whose country has experienced three attacks in recent weeks tweeted in German to say: "We, French, share the shock and sadness of the Austrians after an attack in Vienna.
"After France, it is a friendly country that is under attack. This is our Europe. Our enemies need to know who they are dealing with. We won't give in to anything."
US President Donald Trump tweeted on Monday night as he prepared for his final rally ahead of Election Day saying: "Our prayers are with the people of Vienna after yet another vile act of terrorism in Europe."
"These evil attacks against innocent people must stop," Mr Trump added.
"The US stands with Austria, France, and all of Europe in the fight against terrorists, including radical Islamic terrorists."
Austria’s military has provided soldiers to guard key sites in Vienna, freeing up police to continue the investigation.
Germany and Hungary have offered to send tactical police units to support their Austrian colleagues.
Authorities say members of the public have uploaded 20,000 videos of the attack to police.