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.