Sweden's prime minister has called for calm following an election that put an anti-immigration party in parliament for the first time.

Prime Minister Fredrik Reinfeldt's ruling coalition was re-elected Sunday, but lost its parliamentary majority by a slim margin. He has called for patience until October when he will announce how he plans to lead the minority government.

In Sunday's vote, the right-wing Sweden Democrats made history by winning 20 seats in parliament. The party's leader Jimmie Akesson says his party, which ran on a strongly anti-immigrant platform, is ready to work with the ruling coalition.

But Mr. Reinfeldt has said he wants to avoid reliance on the Islam-bashing party.

The prime minister said he will court the Green Party to avoid political deadlock. Green party officials so far have held back their support of Mr. Reinfeldt's alliance of moderate and conservative parties.

With nearly all the votes counted from the general election, Prime Minister Reinfeldt's center-right coalition won 173 seats in the 349-seat parliament -- just a few short of a majority.

A final count of the votes is not expected until Wednesday.

If the preliminary results hold up, Mr. Reinfeldt's government will be the first conservative government reelected in Sweden in nearly 100 years.