A manhunt was underway in Stockholm on Friday after a truck was driven into a crowd on a busy shopping street before crashing into a department store, killing three people in what the prime minister said was a suspected terrorist attack.
At least eight other people were wounded in the attack.
There was no immediate claim of responsibility, but Swedish television reported the driver was still at large.
Three hours after the attack, police issued an image of a man they said they wanted to speak to in connection with the incident. They were also warning people to stay away from the city centre.
Mats Lofving, head of Swedish police's National Operations Department, said the picture, which appeared to be CCTV footage, was taken around the time of the attack.
"I have a picture of a person who has been seen at the location at this point in time. We want to get in contact with this person," he told a news conference.
The grainy image shown by police showed a man wearing a jacket with a dark hood over a bright T-shirt and dark trousers.
Part of central Stockholm was cordoned off and the area evacuated, including the main train station. All subway traffic was halted on orders from the police.
The parliament building and the government headquarters were both in lockdown, according to a radio report shared by the official Sweden Twitter account.
"Sweden has been attacked. Everything points to the fact that this is a terrorist attack," Prime Minister Stefan Lofven told reporters during a visit to western Sweden. He was immediately returning to the capital.
King Carl Gustaf, Sweden's head of state, expressed his horror at the attack.
"Our thoughts are going out to those that were affected, and to their families," he said in a statement from the royal palace.
The truck smashed into the Ahlens department store near the centre of the city just before 3pm local time.
"We were standing by the traffic lights at Drottninggatan (Queen Street) and then we heard some screaming and saw a truck coming," a witness, who declined to be named, told Reuters.
"Then it drove into a pillar at Ahlens City (department store) where the hood started burning. When it stopped, we saw a man laying under the tyre. It was terrible to see."
The truck was reportedly stolen earlier on Friday from a brewery called Spendrups, and had been on its way to a restaurant delivery.
Sweden's TT news agency quoted the company's communications director, Marten Lyth, as saying "someone jumped into the driver's cabin and drove off while the driver unloaded."
Authorities imposed sweeping security measures, closing off streets and shutting down public transport lines in scenes similar to those seen in London when a car was driven into pedestrians on Westminster Bridge last month.
One witness, named only as Anna, told Stockholm newspaper Aftonbladet that she saw hundreds of people running.
"They ran for their lives," she said. "I turned and ran as well."
John Backvid was at the scene shortly after the truck hit pedestrians near the shopping mall.
He said he first noticed smoke hanging in the air, then realised there were injured people on the ground.
"Some people were on the ground doing CPR ... I was standing there for maybe 30 seconds before the police car arrived," Mr Backvid told the BBC.
Police soon began to clear the area, he said, owing to concerns the burning truck could ignite a gas canister on a nearby street cart.
"They began to scream about gas, and I ran away with a lot of other people. It was very chaotic. The police were very quick," Mr Backvid said.
He said he did not see the driver of the truck.
"My initial thought was this truck must have been driving way too fast," Mr Backvid said.
Soon, he said, police with submachine guns flooded to the area, "driving down the street quite quickly and telling everyone to get out of the city."
Another witness, Annevi Petersson, told the BBC she had just walked into a shop on the pedestrian boulevard when the truck ploughed into several people.
"I heard the noise, I heard the screams. I saw the people as I walked out immediately," she said.
She said she saw a dead dog on the footpath, and then saw the dog's distraught owner clutching the dog and screaming.
There was a "sense of sheer panic" on the street, and store owners locked their customers inside.
"It was the noise, then everything got quiet, then everyone started screaming and crying," she said. "There was blood everywhere, there were bodies on the ground everywhere."
Television footage showed smoke coming out of the department store, while photos showed flames coming from the truck's cabin.
Swedish police said they received calls about a person who injured others driving a vehicle on the central Stockholm street of Drottninggatan.
Over the border in Norway, police in the largest cities and at Oslo's airport were ordered to carry weapons until further notice, Norwegian police said in a tweet.
Police officers in Norway do not usually carry guns on them.
In Finland, police increased patrols in the capital Helsinki.
Several attacks in which trucks or cars have driven into crowds have taken place in Europe in the past year.
On March 22, a man in a car ploughed into pedestrians on Westminster Bridge in London, killing four, and then stabbed a policeman to death before being shot by police.
Islamic State claimed responsibility for both an attack in Nice, France, last July, when a truck killed 86 people celebrating Bastille Day, and one in Berlin in December, when a truck smashed through a Christmas market, killing 12 people.
The European Union offered Sweden support and solidarity on Friday.
"An attack on any of our member states is an attack on us all," said EU chief executive Jean-Claude Juncker.
"One of Europe's most vibrant and colourful cities appears to have been struck by those wishing it – and our very way of life – harm.
"We stand shoulder to shoulder in solidarity with the people of Sweden and the Swedish authorities can count on the European Commission to support them in any which way we can."
EU President Donald Tusk also tweeted his support.
German government spokesman Steffen Seibert also reacted to the news.
"Our thoughts are with the people in Stockholm, the injured, relatives, rescuers and police. We stand together against terror," he said in a tweet.
Sweden's Nordic neighbours also expressed their horror.
"Terrible news from Stockholm. Our thoughts are with our neighbours and friends in Sweden," Finland's Prime Minister Juha Sipila wrote in Swedish on his Twitter account.
Danish Foreign Minister Anders Samuelsen, speaking in Vienna, called for more cooperation between countries to combat attacks.
"It's so horrible to learn about this terror attack ... It's horrible, it's disgusting and we have to fight this terror appearing in Europe," he said.
"And one thing we can do is to cooperate even closer on exchanging data, exchanging information about what we learn of those terror cells or terrorists."
with AP, Reuters