STOCKHOLM (AP) -- A populist anti-immigration party surged to become Sweden's second largest political force in a weekend election dominated by fears of gang violence that has made the once-safe Scandinavian country one of Europe's most dangerous.
Overall, a conservative opposition bloc including the anti-immigration party, the Sweden Democrats, had an extremely narrow lead over the incumbent center-left with 94% of the votes counted.
Analysts expected that the final tally would confirm a conservative win, but the election was so close that electoral officials said they would not have the final result until outstanding postal votes and votes from abroad are counted later in the week.
It was a suspenseful election to the end, with polling ahead of the vote showing the race too close to call and exit polls published Sunday night initially predicting a center-left victory. As the official results came in over the following hours, the center-left's edge slipped away.
One certainty, however, is that the result marked a success for the Sweden Democrats, which won its best result since entering parliament in 2010.
The party's founders in the 1980s had links to fascist and neo-Nazi movements but over the past two decades it has worked to move to the mainstream under its 43-year-old leader Jimmie Akesson.
Its transformation included changing its official logo from a torch to a flower and expelling the most radical members.
Those who support it like its tough vows to crack down on crime and strictly limit immigration, while opponents fear that its historic roots make it a threat to Sweden's democratic identity.
Mark Johnson, a 50-year-old finance worker, said that while the party's strong showing was expected, it is still shocking for many Swedes because "it's hard to understand that we would be taking such an obvious turn to the right, to the far right even."
The Sweden Democrats, which won 20.6% according to preliminary figures, up from 17.5% four years ago, gained on the rising fears of crime in largely immigrant neighborhoods and a perception that the center-left failed on that front in its eight years in power.
This year so far there have been 273 shootings, 47 of which were deadly, according to police statistics. Those shootings also resulted in 74 people being injured, including some innocent bystanders.
The left bloc is headed by Prime Minister Magdalena Andersson, Sweden's first female prime minister, who has not resigned.
Andersson's Social Democrats, who have been in power in Sweden since 2014, remain the largest party, even gaining slightly to take 30.5% of the vote according to the incomplete results. Andersson said Sunday night that it was obvious that the social democratic movement, which is based on ideals of creating an equal society and a strong welfare state, remains strong in Sweden.
With eight parties contending for seats in the 349-member Riksdag, Sweden's parliament, none can secure a majority of 175 seats, meaning that laws can only be passed with different parties working together.
The not-yet-final count indicated that the conservatives would have 176 seats and the center-left would have 173.
"It is extremely close. Things can change, but I doubt it," said Zeth Isaksson, a sociologist at Stockholm University. "As it is now, it is more likely that the right side will win."
Votes abroad are traditionally conservative, meaning that the still-uncounted votes are unlikely to swing the momentum back to the left, according to Isaksson.
The Sweden Democrats wants to be part of a government, but this is unlikely to happen because there are parties in the center-right bloc that oppose it, Isaksson said.
Richard Jomshof, the Sweden Democrats' party secretary, said Monday: "It is clear that we must be able to discuss ministerial posts. it is clear that we must be able to talk about the position of prime minister, speaker of parliament and the presidium positions in the various Riksdag committees."
But a senior member of the center-right Liberals told Swedish radio Monday morning that it cannot allow the Sweden Democrats to be part of a government.
Still, if the right prevails, the Sweden Democrats will have "very strong leverage" and will push for some of its issues, like tightening immigration laws, Isaksson said. He said a likely outcome could be for the Sweden Democrats to end up outside a government but as supporters of it.
Isaksson also ruled out a governing coalition combining the center-right Moderates, which have been leading the center-right bloc, and the Social Democrats. Such a coalition has not occurred since World War II.
The Moderates dropped to become Sweden's third largest party and won 19%, based on the incomplete vote tally. However, party leader Ulf Kristersson on Monday appeared to be the most likely candidate to be the next prime minister. He told his supporters on election night that he stands ready to try to create a stable and effective government.
Either way, Sweden is likely to face a lengthy process to form a government, as it did after the 2018 election.
Andersson, a 55-year-old economist, became Sweden's first female prime minister less than a year ago and led Sweden's historic bid to join NATO following Russia's invasion of Ukraine in February.