STOCKHOLM — A man drove a stolen beer truck into a crowd of people in a popular shopping district in Stockholm and then plowed into a department store, killing four people and injuring 15 others in an attack in the streets of another European capital.
“Sweden has been attacked. All indications are that it was a terrorist attack,” Prime Minister Stefan Lofven said.
Stefan Hector of the Sweden’s national police said, ‘‘We have a working hypothesis this is an act of terror.’’ Officials said they did not know whether it was an isolated assault or something bigger.
The Swedish Parliament was put on lockdown, according to news reports. Train service had resumed by the evening but the police, who blocked off the affected area, urged people to stay at home and avoid the city center.
Katarina Libert, 32, a freelance journalist, was trying on clothes at the department store when she heard a boom and the walls shook.
At first, she said, she thought the noise was people moving things around the store, but then the fire alarm went off and staff members told her and other shoppers to get out of the building.
“We were running, we were crying, everyone was in shock,” Libert said. “We rushed down the street, and I glanced to the right and saw the truck. People were lying on the ground. They were not moving.”
She said she usually avoided busy areas that could be potential terrorist targets, but that she had decided to take the Friday afternoon off to do some shopping.
A representative of the Spendrups brewery told Radio Sweden that the vehicle had been taken earlier in the day. A spokesman for the company told SVT, a national public broadcaster, that the truck had been stolen while the driver was loading it from the rear.
Loefving asked for the public’s help in identifying a man wearing a hooded sweatshirt in a police photo: “We want to get in touch with this man.” It was not immediately clear if the man taken into custody later in the day was the person in the photo.
Dr. Nelson Follin, the medical chief of Stockholm’s Karolinska University Hospital, told the newspaper Dagens Nyheter that the hospital was treating “a handful” of people.
“The injuries are quite serious, but for now I cannot give further comments on conditions,” Follin said.
Fears from the attack reverberated in neighboring Norway, where the police said on Twitter that officers in that nation’s largest cities and at the airport in Oslo would be armed until further notice after the attack in Stockholm.
The Islamic State revived the idea of using cars as weapons after it broke with Al Qaeda in 2014. In the past year, Islamic State militants have claimed responsibility for the deaths of more than 100 people in Europe.
In France, a man drove into a crowd on a busy seaside promenade during Bastille Day celebrations in Nice.
Another attacker plowed a truck into shoppers at a Christmas market in Berlin. And last month, an assailant drove a car into pedestrians on Westminster Bridge near Parliament in London.
Other attempts, including an episode in which a man tried to drive over pedestrians in Antwerp, Belgium, claimed no victims, but have contributed to a sense of dread across the Continent.
Although some Swedes have expressed concern that immigration has led to a crime wave in the country — and President Trump seemed to suggest in a speech on Feb. 18 that there had been an attack in Sweden, when in fact nothing had occurred — the country and the region remain largely peaceful and safe.
The most notable exception came in 2010, when an assailant killed himself and wounded two others after detonating two bombs in central Stockholm, on a side street not far from where Friday’s attack took place.