Swedish police are still hunting the person who drove a truck into a crowd of people in Stockholm, leaving four people dead and 15 injured.
Police arrested another man earlier in the evening in a suburb north of Stockholm.
That man's appearance had matched that of a man in a picture released by police as a person of interest wanted in connection with the attack.
Four people were killed and eight wounded in what the prime minister said appeared to be a terrorist attack.
Part of central Stockholm was cordoned off and the area was evacuated, including the main train station. All subway traffic was halted on orders from the police.
"Sweden has been attacked. Everything points to the fact that this is a terrorist attack," Prime Minister Stefan Lofven told reporters during a visit in western Sweden. He was immediately returning to the capital.
Many police and emergency services personnel were at the scene, a witness said.
The incident occurred at the corner of the Ahlens department store and the city's biggest pedestrian street, above ground from Stockholm's central subway station.
A government source said all Swedish government offices had been closed. All ministers were safe, the source said.
"We were standing by the traffic lights at Drottninggatan (Queen Street) and then we heard some screaming and saw a truck coming," a witness said.
"Then it drove into a pillar at Ahlens City (department store) where the hood started burning. When it stopped we saw a man lying under the tire. It was terrible to see," said the man, who saw the incident from inside his car.
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.
In Brussels, the European Union offered Sweden support and solidarity.
"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."
Several attacks in which trucks or cars have driven into crowds have taken place in Europe in the past year. In 2010, Al Qaeda urged its followers to use trucks as a weapon.
In London on 22 March, a man in a car ploughed into pedestrians on Westminster Bridge, killing four, and then stabbing a policeman to death before being shot by police.
The so-called 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.