Two men and two women have died in a terror attack in Vienna – and 17 others, including a police officer, have been wounded.
Seven of the victims are in a life-threatening condition, according to the APA news agency.
One suspect, who was armed with an assault rifle and wearing a fake suicide vest, was shot dead by police.
Austrian security officials said the gunman was a 20-year-old dual citizen of Austria and North Macedonia.
Named by Austrian media as Kujtim Fejzulai, he was sentenced to 22 months in prison in April 2019 because he had tried to travel to Syria to join Islamic State (IS).
Under juvenile law, he was granted early release in December.
He struck on Monday evening near Vienna’s main synagogue as many people were enjoying a last night of open restaurants and bars before the start of a coronavirus lockdown.
"It is now confirmed that yesterday’s attack was clearly an Islamist terror attack,” 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.”
Austria’s interior minister, Karl Nehammer, described the suspect as an IS sympathiser and said the operation to track down any other suspects was ongoing.
He added that special forces from neighbouring countries were helping and that the home of the suspect killed by police had been searched, with video material being seized.
British Prime Minister Boris Johnson expressed his deep shock at the "terrible attacks”. He said: "The UK’s thoughts are with the people of Austria – we stand united with you against terror.”
It is believed some arrests have been made in connection with the attack following further raids, and the city’s residents have been urged to stay at home.
The first gunshots were heard at 8pm at the Seitenstettengasse synagogue, which was closed at the time.
Rabbi Schlomo Hofmeister said he saw at least one person shoot at people sitting outside bars below his window.
Mr Hofmeister said: "They were shooting at least 100 rounds just outside our building.
"All these bars have tables outside. 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,” he added.
Eveline, a witness and student, said: "First we did not know what it was, but suddenly people, who were sitting in other guests’ gardens, started to run.
"First we kept standing there because we did not know what was going on, then there was shooting again, but closer, so we started to run away. Because we did not know if we were running in the right direction, we ran into a hotel and hid there.”
French President Emmanuel Macron tweeted that the French "share the shock and grief of the Austrian people hit by an attack tonight”.
He wrote: "After France, this is a friendly country that has been attacked. This is our Europe… We will not give in.”
France has endured three attacks blamed on Muslim extremists in recent weeks.
Officers said the operation in the city centre was ongoing and urged people to avoid open spaces and public transport, and footage posted online showed crowds fleeing.
In other videos uploaded to social media, armed officers were seen patrolling the streets and gunfire could be heard in one clip recorded from a window above a McDonald’s restaurant.