Prime Minister Stefan Lofven visited the centre for unaccompanied migrants in Molndal, near Gothenburg, hours after the killing.
An asylum seeker of 15 was arrested on suspicion of murder. The victim has been named locally as Alexandra Mezher.
Mr Lofven said many Swedes feared that such attacks could happen again.
"I believe that there are quite many people in Sweden who feel a lot of concern that there can be more cases of this kind, when Sweden receives so many children and youth, who come alone [to seek asylum]" he was quoted as saying by Radio Sweden.
Police officers arriving at the scene at Molndal near Gothenburg found a "crime scene with a lot of blood", said spokesman Thomas Fuxborg.
"The perpetrator had been overpowered by other residents, people were down and upset."
The victim, whose family was described as Lebanese in origin, died in hospital of her injuries.
Ms Mezher had worked at the asylum centre for a few months and a cousin quoted by Expressen newspaper said she was "an angel who wanted to do good". She had been planning to do a postgraduate course in social sciences, Goteborgs-Posten reported. Read more on bbc.