"For nearly two decades, Swedish politics has been pro-Palme, anti-Palme or just Palme," wrote a leading opposition politician last week. The best known Swede to much of the world, at home Olof Palme cast a towering shadow beneath which everyone else in public life seemed to pale.

In the aftermath of his brutal and untimely death, Sweden will doubtless seem duller politically. But the sad irony is that Palme's departure from the political scene may ensure his Social Democratic Party a longer, and perhaps firmer, lease on power.

Passionate and contentious, Palme was a very un-Swedish politician who tended to incite similarly strong emotions in both his supporters and his detractors. There was no sign that his energy and the personal loyalty he engendered were waning.

But during Palme's 17 years as party leader, the Social Democrats suffered their first defeat in 44 years, to a coalition of three center-right parties in 1976. He fought his way back in 1982, and last year's narrow election victory came after a bitter race in which the Social Democrats were forced to defend the very foundation of their policies -- the Swedish welfare state.

While it is a concept that most Swedes approve of, dwindling resources and ever-higher taxes have taken a toll on national consensus in recent years, bringing divisions inside the governing party and hope to the opposition. Much of that hope centered on a belief that Palme's confrontational style eventually would become a liability, rather than an asset, for his party.

It is not a subject that many politicians here want to talk about yet. But the reluctance of Palme's political opponents to enumerate his failings does not inhibit their acknowledgment of the attributes of his successor.

Acting Prime Minister Ingvar Carlsson "is a conciliator," said Carl Bildt, a prominent figure in the opposition Moderate Party. "He is widely respected across Sweden, among politicians from Liberals to Communists. . . . He is in tune with what Swedes want."

While Palme's energetic stumping and dazzling oratory brought the party together in time for last year's electoral victory, Carlsson is viewed as someone who can massage and revitalize the deep national consensus that gives the Social Democrats their traditional hold on power.

Carlsson, 51, is Palme's physical and stylistic antithesis. While he is said to be witty and gracious in private, his public air is that of a sincere and studious schoolboy. Tall and a bit gangly, he appears younger than his years and less sophisticated than his colleagues and political opponents know him to be.

Palme and Carlsson entered politics together as acolytes of longtime Social Democratic leader Tage Erlander. When the time came for them to move into national roles, "I think Carlsson took one look at Palme and said this man has charisma I will never have -- energy and enthusiasm I can never match," said a western diplomat with long experience here.

With Carlsson in the background, Palme took Sweden to international heights. His prominence as an international spokesman for world disarmament and human and economic rights gave him added cachet at home. Carlsson, at one point designated minister for the future, worked behind the scenes, planning party strategy and building parliamentary coalitions on crucial domestic issues.

When the Social Democrats dropped to 159 seats in Sweden's 349-seat unicameral parliament last year, it was Carlsson who was charged with working out a voting alliance with the small Communist Party. The Communists' 19 votes, wooed on an issue-by-issue basis, have proved crucial for government programs.

In the short and medium term, Carlsson obviously will be helped by a lack of desire on all sides to raise contentious issues during a prolonged period of national mourning. Already, public sector workers who were headed toward a strike over wages have postponed their plans indefinitely. Anticipated disagreement over economic legislation due for presentation in parliament next week undoubtedly has been lessened.

There is likely to be some change in the style of government, with other leading Social Democratic figures, particularly Foreign Minister Sten Andersson and Finance Minister Kjell-Olof Feldt, assuming more visible roles than under Palme.

The core of Sweden's activist foreign policy, which commanded broad support here in substance, if not always in style, under Palme, is likely to remain the same. But while Carlsson is U.S.-educated, at Northwestern University, fluent in several languages and conversant on international technical cooperation, he has little foreign policy experience and lacks the personal identification with those issues that Palme built during 30 years of activism -- and the temperament to make himself heard.

Carlsson has said he plans to keep Palme's April appointment in Moscow -- the first official Swedish visit there in 10 years. Carlsson also is likely to receive the invitation to Washington that always was withheld from Palme, a sharp critic of what he saw as Washington's interventionist foreign policy in the Third World.

Most of Carlsson's energy, however, will be absorbed by domestic issues. He is due to be reaffirmed as new party leader at next year's Social Democratic conference, and planning will soon begin for elections due in 1988.

But it is his very difference from Palme that may prove the key to success for Carlsson and the Social Democrats during the next sensitive few years in Sweden. Carlsson, the diplomat said, is a man of "plodding rationality. He is a Swede -- steady as a rock, and probably just what Sweden needs right now."

What Sweden seems most to need in the short term is reassurance that life here has not been changed unalterably by Palme's assassination. Swedes share a remarkably homogeneous view of themselves and their country. They see Sweden as a sort of modern-day Brigadoon -- a peaceful, progressive little corner that radiates goodness and social justice into an evil world.

Far from destroying what might seem like Swedish naivete, the fact that evil has touched them has made many Swedes more committed than ever to an aggressive innocence.

Carlsson has moved quickly into the role of comforter. Once the current national scare has abated and Palme's killer has been caught, he said last week, he and other Swedish officials again would walk the streets, like Palme, without bodyguards. "These are values that are too important to our society" to abandon, he said.

No matter who proves to be responsible, Carlsson said last week, "Sweden could not and will not build barriers. That price would be unbearably high, and against all our convictions."