The populist, anti-immigration Sweden Democrats' rise to real power after the election has civil rights groups and many immigrants worried about what the future might hold in a country long known for tolerance and openness.
Social Democrat Prime Minister Magdalena Andersson has resigned, meaning Moderate Party leader Ulf Kristersson must now try to form a new government. He cannot do so without the support of the Sweden Democrats, who became the second biggest party with 20.5 percent of the votes.
The gains for the Sweden Democrats come on the back of what many voters saw as failed immigration and integration policies.
The party tapped into anger over crime and gang shootings, mostly by blaming immigrants for the violence.
It has set out a 30-point program aimed at achieving the lowest immigration in Europe, including legislation that would make it possible to deny asylum to anyone saying they are fleeing persecution for being gay or for changing their faith.
"Welcome to the repatriation train. You have a one-way ticket. Next stop, Kabul!" read a tweet from the Sweden Democrats' law and order spokesperson Tobias Andersson.
It is the sort of rhetoric that has left many of the country's roughly two million inhabitants that were born abroad worried and frustrated.
"If they think I'm going back they must be dreaming," said Geza, a 54-year-old restaurant worker who came to Sweden from Somalia 30 years ago. "I live here, I work here, I pay taxes here. I have a Swedish passport. I am Swedish."
The Sweden Democrats have several proposals to send people back to their countries of origin. Those who have not "adapted to society in a good way should be encouraged to return," the party said in a manifesto," said the party's first deputy Henrik Vinge.
"We want to get started right away to achieve a sustainable migration policy. We wish our ideas had been heard 10-20 years ago, then we wouldn't have the problems we have today."
Outside central Stockholm's biggest mosque, just a couple hundred yards from where Sweden Democrat leader Jimmie Akesson held a rally a month ago and promised to slash immigration, a group of young Muslim men talked.
"It wasn't easy to be a Muslim here before and I am worried it will become tougher now," said a student, adding he had found Swedes welcoming and it was hard to take in that one in five of them had voted for the Sweden Democrats. Akesson has described Islam as the biggest foreign threat to Sweden since World War II. The party wants to ban Muslim schools.
A white paper commissioned by the Sweden Democrats showed 18 of the party's 22 founding members in 1988 came from white supremacist group Keep Sweden Swedish. About 10 of them had links to fascist or Nazi organizations, it said.
Civil Rights Defenders, an international human rights watchdog and advocacy group based in Stockholm, said it had gone through all parties' proposals on law and order, democracy and immigration and found those from the Sweden Democrats troubling.
"In all these areas we see proposals that restrict human rights, that weaken rule of law and undermine democracy," Civil Rights Defender legal director John Stauffer said.
Stauffer said examples included proposals to revoke citizenship, increase surveillance without probable cause, toughen punishment and make more actions illegal.
Jimmie Akesson and his Sweden Democrats want to ban Muslim schools. AP