Four people were killed and 15 injured when a stolen truck ploughed into a crowd of people outside a busy department store in central Stockholm Friday, police said, adding that one man had been arrested in connection with the attack.
It was the latest in a string of similar assaults with vehicles in Europe, including in London, Berlin and the southern French city of Nice.
Children were among the injured, Stockholm's regional health care authorities said in a statement.
"Sweden has been attacked. Everything points to a terror attack," said Prime Minister Stefan Lofven, who cut short a visit in southwestern Sweden to return to Stockholm after what, if confirmed, would be the country's first deadly terror attack.
Police had earlier released a grainy picture of a suspect they did not have in custody.
Police spokesman Lars Bystrom refused to say whether the man who was later arrested was the man in the picture, and would not confirm media reports that he had confessed to the attack.
Police had earlier said two people had been taken in for questioning.
Pictures taken at the scene showed a large blue truck with a mangled undercarriage smashed into the Ahlens department store.
A spokeswoman for beer company Spendrups told AFP that the truck "had been stolen during a delivery to a restaurant."
Witnesses described scenes of terror and panic.
One witness identified only as Dimitris told the Aftonbladet daily the truck came "out of nowhere."
"I couldn't see if anyone was driving but it was out of control. I saw at least two people get run down. I ran as fast as I could away from there," he said.
Another shopper, 66-year-old Leander Nordling, was at Ahlens when he suddenly heard a loud bang.
"It sounded like a bomb exploding and smoke starting pouring in through the main entrance," he told daily Aftonbladet.
He and fellow shoppers took refuge in a storage room inside the department store.
"After that the building was evacuated ... There were a lot of guards who took care of us outside and they urged us to leave the scene immediately," Nordling said.
Video footage taken from above showed scores of people streaming down the street in terror.
The attack occurred just before 1300 GMT at the corner of the store and Drottninggatan, the city's biggest pedestrian street, above ground from Stockholm's central subway station.
Thick smoke billowed from the scene, while the area was blocked off by police and crowds gathering around the police cordon.
Police vans circulating in the city using loudspeakers urged people to go straight home and avoid large crowds.
The centre of the usually buzzing city was in lockdown, with the central train station evacuated and other stores quickly emptied of shoppers.
The Stockholm metro was also completely shut down for several hours before resuming in the early evening, with the attack taking place at the city's T-Centralen station, through which all the city's lines pass.
Cinemas, shopping malls and other public buildings were also evacuated.
The area around the attack was cordoned off, but other streets in the city were packed for hours with pedestrians trying to find a way home.
Helicopters could be heard hovering in the sky over central Stockholm, and a large number of police cars and ambulances were dispatched to the scene, witnesses said.
Another section of Drottninggatan was also the scene of Sweden's only other terror attack, in 2010, when a suicide bomber blew himself up, killing himself and slightly injuring several others.
European politicians expressed solidarity, with European Commission President Jean-Claude Juncker saying that it was an "attack on us all."
A spokesman for German Chancellor Angela Merkel said: "Our thoughts go out to the people in Stockholm, to the injured, their relatives, rescuers and police.
"We stand together against terror."
French President Francois Hollande voiced his "horror and indignation" over the assault.
The attack followed a string of similar massacres in Europe by people using vehicles as weapons.
The deadliest came last year in France on the Bastille Day national holiday of July 14, when a man rammed a truck into a crowd in the Mediterranean resort of Nice, killing 86 people.
He was shot dead by police, and the Islamic State (IS) militant group later claimed responsibility.
Last month, Khalid Masood, a 52-year-old convert to Islam known to British security services, drove a car at high speed into pedestrians on London's Westminster Bridge before launching a frenzied knife attack on a policeman guarding the parliament building.
The incident killed five people, while Masood himself was shot dead by police.
And in December, a man hijacked a truck and slammed into shoppers at a Christmas market in Berlin, killing 12 people.
That attacker was shot dead by police in Milan four days later, and the rampage was claimed by the IS.
In 2014, IS called for attacks on citizens of Western countries and gave instructions on how they could be carried out without military equipment, using rocks or knives, or by running people over in vehicles.
Attacks have not been limited to Europe.
In 2014, a Muslim convert used his car to mow down two soldiers near Montreal, killing one of them. The attacker was shot dead by police as he climbed out of his wrecked vehicle brandishing a knife.
There have also been false alerts, however.
Earlier Friday, Belgium dropped terrorism charges against a driver who sped into a crowded shopping area in Antwerp last month, which sparked fears of a copycat terror attack.