STOCKHOLM  Sweden became the latest European nation to see a breakthrough for populist right-wingers Sunday, when the anti-immigration Sweden Democrats won their first parliamentary seats in elections that failed to produce a clear outcome.

The prime minister, Fredrik Reinfeldt, who led an alliance of four parties, claimed victory and is almost certain to become the first leader from Sweden’s center-right since World War II to serve two consecutive terms.

But, with all the votes counted, the country’s election authority said his alliance was three seats short of the 175 needed for a parliamentary majority.

Nevertheless, Mr. Reinfeldt ruled out working with the Sweden Democrats and called on other parties to support him, a declaration that suggested that Sweden may be headed for a minority government. “We will not cooperate with the Sweden Democrats, we will not make ourselves dependent on them,” he said in front of party workers.