A lorry has smashed into a store in central Stockholm, killing at least four people.
At least a dozen people were also injured in the incident on Drottninggatan (Queen Street), one of the city's major pedestrian streets, on Friday afternoon.
Swedish Prime Minister Stefan Lofven said it was a terror attack.
One man has been arrested, after police released a CCTV image of a person who may be connected to the case.
In a speech on Friday night, Mr Lofven said Swedish values of democracy and freedom would not be "undermined by hatred".
He also announced the country's border controls had been strengthened.
The crash happened at the Ahlens department store just before 15:00 local time (13:00 GMT). Witnesses say the lorry drove into the front window.
One eyewitness, Annevi Petersson, told the BBC she was in the shop's fitting room when she heard the screams. "There was blood everywhere," she said.
Swedish brewery Spendrups said its lorry had been stolen on its way to a restaurant delivery earlier in the day.
"Someone jumped into the driver's cabin and drove off with the vehicle while the driver was unloading," a brewery spokesperson told the TT news agency.
The shop sits close to the city's central station, which was evacuated.
The metro, central roads and various bus lines were also shut down after the attack.
Shots were reportedly fired in another part of the city, but Swedish police told local media there was no connection between the two incidents.
City authorities said they had made several spaces, including a number of school buildings, available as temporary accommodation for those who could not get home because of transport disruptions.
They have also asked people not to share photographs of the victims online.
Analysis, by Frank Gardner, BBC's Security Correspondent
I was in Stockholm yesterday, ironically at a security conference. I don't think Sweden was prepared for something like this.
The last big terror incident they had was in 2010 when a failed suicide bomber blew himself up in a car in central Stockholm.
The country has good intelligence-gathering apparatus: Sapo, the Swedish equivalent to the UK's MI5 agency, have got the finger on the problem, but the legislation is not there to deal with it.
Insiders have been concerned for quite some time that Sweden has been a bit lax about security. It is important at this stage, though, to keep an open mind about the perpetrator. It's not impossible that it was someone with personal, psychological problems, rather than a political motive.
Timeline: Vehicle ramming attacks in Europe and the US
- 14 July 2016, Nice, France: A man drove a lorry for 2km (1.2 miles) through a large crowd gathered to watch Bastille Day fireworks in Nice. Eighty-six people were killed, and more than 300 injured.
- 28 November 2016, Ohio, United States: An 18-year-old student rammed his car into a group of pedestrians at Ohio State University and stabbed others. Eleven people were injured before he was shot and killed.
- 19 December 2016, Berlin, Germany: The attack in Berlin killed 12 people and injured 49, when a man drove a lorry through the crowded Breitscheidplatz Christmas market. So-called Islamic State said one of its "soldiers" carried out the attack.
- 22 March 2017, London, United Kingdom: Six people died and at least 50 were injured when a car mounted the pavement on London's Westminster bridge and drove at high speed through pedestrians. The attacker then entered the parliament complex on foot and fatally stabbed a police officer, before being shot.
- 23 March 2017, Antwerp, Belgium: A man was caught by soldiers after he drove at a crowd. Knives, a non-lethal gun and a dangerous substance were found in his car - but no-one was injured. Terror charges were later dropped.