Swedish Prime Minister and leader of the Social Democrats Magdalena Andersson hands in her vote at a polling center in Nacka, near Stockholm, on September 11.

Sweden’s right bloc inched into the narrowest of leads with around 90% of votes counted after Sunday’s general election, with results pointing to a new government after eight years of Social Democrat rule.

Early on Monday, figures showed the Moderates, Sweden Democrats, Christian Democrats and Liberals winning 176 seats in the 349-seat parliament against 173 for the centre-left.

In further evidence of a shift to the right, the anti-immigration Sweden Democrats are set to overtake the Moderates as Sweden’s second biggest party and the biggest in the opposition – a historic shift in a country that has long prided itself on tolerance and openness.

Nevertheless, Moderate leader Ulf Kristersson is likely to be the right’s candidate for prime minister.

“We don’t know what the result will be,” Kristersson told supporters. “But I am ready to do all I can to form a new, stable and vigorous government for the whole of Sweden and all its citizens.”

File photograph of Ulf Kristersson, leader of the Moderate party.

With overseas and some postal votes yet to be counted and the margin between the two blocs wafer-thin, results could still change.

Kristersson has said he would seek to form a government with the small Christian Democrats and, possibly, the Liberals, and only rely on Sweden Democrat support in parliament. But it may be hard for him to keep at arms length a party that is set to be bigger than his own.

“Right now it looks like there will be a change of power. Our ambition is to sit in the government,” Sweden Democrat leader Jimmie Akesson told jubilant supporters at a post-election party.

Social Democrat Prime Minister Magdalena Andersson did not concede defeat on election night, saying results were too close to call.

The election authority said a preliminary result would be available at Wednesday at the earliest.

Whichever bloc wins, negotiations to form a government in a polarized and emotionally-charged political landscape are likely to be long and difficult.