The leaders of the Soviet Communist Party today began the process of selecting a successor to Leonid Brezhnev, who died yesterday of a heart attack after 18 years in power.

Well-informed sources said that the remaining members of the party's Politburo, the most powerful organization in the Soviet hierarachy, along with secretaries of the party's Central Committee and some of its most influential members held a long session today in an effort to select the new party leader prior to a plenary session of the Central Committee on Friday.

All members of the 320-member policy-making Central Committee have been summoned from around the country for Friday's meeting, according to the sources.

Although the Politburo had elected Vladimir Shcherbitsky, the Ukrainian party chief, as its temporary presiding officer, the sources said that the struggle for leadership focused on the contest between Yuri Andropov, the former chief of the KGB, the Soviet security police, and Konstantin Chernenko, Brezhnev's closest associate who, in effect, acted as the late president's deputy for most of this year.

According to one report which could not be confirmed, Chernenko appeared to have an edge within the party elite. Various informants, however, said there is a remote possibility that a stalemate could develop at Friday's plenum, which would result in the selection of a compromise choice.

Diplomatic observers, however, attached considerable significance to the fact that Andropov, 68, was named to head the official 25-member funeral committee. It includes seven Politburo members, among them the key persons in the inner leadership -- Marshal Dmitri Ustinov, the defense minister, Premier Nikolai Tikhonov, 76, and Chernenko. Their selection was announced in statement made jointly by the Central Committee, the presidium of Supreme Soviet (the national assembly) and the Council of Ministers (the cabinet).

An official bulletin signed by a group of doctors including Brezhnev's personal physician, Yevgeny Chazov, said the 75-year-old Soviet leader had suffered from arterio-sclerosis of the aorta and had had several previous heart attacks before the "sudden" seizure yesterday "between 8 and 9 o'clock in the morning."

Calling on the Soviet people to rally firmly behind the party and government and display "a high sense of awareness and organization," an official proclamation pledged to continue Brezhnev's policy of detente.

Yet the proclamation also warned about the need for greater vigilance and emphasized that "a crushing retaliatory blow" awaits any potential aggressor. The declaration was also a joint product of the Central Committee, the Supreme Soviet presidium and the Cabinet.

At the moment, all authority in this country seems to be in the hands of about 40 to 50 top officials who stand at the peak of the party and government machinery, although the absence of a clear mechanism of succession makes it difficult to know exactly what procedure they are following until the Central Committee plenum convenes Friday.

According to party statutes, the Central Committee is the main policy-making body in the Soviet Union.

Despite his obvious physical frailties and rumors of illnesses, the timing of Brezhnev's death came as a surprise. For a man of his age, he appeared fit four days ago when he stood for two full hours in freezing temperatures atop the Lenin Mausoleum reviewing a dazzling show of Soviet military might in Red Square.

The news of his death was announced to the Soviet people at 11 a.m. today, or almost 27 hours after the fatal heart attack. In the intervening period, rumors had swept the city that either he or another senior figure had passed away.

The delay was believed to have been caused by the absence of a known mechanism of succession. The leadership was reported to have held a long session yesterday well past midnight and discussions continued today behind the Kremlin walls.

This afternoon, black-bordered flags appeared on the streets of Moscow as the government declared a four-day period of mourning. A state funeral has been scheduled for Monday in Red Square.

Classical music has been broadcast for the past 36 hours on all television channels and the state radio. All sporting events were canceled.

Red Square was sealed off by metal barriers as workers began brushing the vast concourse's cobblestones and removing scaffolding from Sunday's parade in preparations for the funeral.

Reaction by Muscovites to the news of Brezhnev's death appeared muted, without any apparent sign of emotion or private grief.

Today's proclamation by the leadership emphasized the continuity of Soviet domestic and foreign policies. It hailed Brezhnev as the "most prominent politician and statesman of our times" and said both the party and the people have suffered "a grave loss."

It emphasized what it termed "the Soviet peoples' will for peace" and denounced "preparations for war which doom the peoples to a senseless squandering of their material and spiritual resources."

The proclamation, however, also included the Soviet Union's tough policy line that has emerged in recent weeks by stating that "we see the full complexity of the international situation, the attempts by the aggressive circles of imperialism to undermine peaceful coexistence, to push the peoples on the path of enmity and military confrontation.

"But this cannot shake our resolve to uphold peace. We will do everything necessary so that those who like military adventures do not catch unawares our Soviet country, so that a potential aggressor should know that a crushing retaliatory blow will inevitably await him."

The words used in the proclamation were almost identical to the remarks made by Brezhnev during a Kremlin reception on Sunday.

Some diplomatic observers here suggested the tone of the proclamation appears to signal the offer by the new leadership to improve its relations with the United States.

Although the period of Brezhnev's rule has been one of great stability, his policies have begun to unravel in the past three years. His government is now bogged down in a civil war in Afghanistan, threatened in Poland and challenged across the board by a hostile Reagan administration and its tough positions on East-West trade, arms control and detente in general.

Under his leadership, Russia has become militarily stronger than ever and has expanded its direct influence abroad, including forays into Africa, Southeast Asia and Latin America.

Yet the cost of these ventures has sharply escalated just as the Soviet economy appears to be heading toward a crisis, with falling industrial growth rates and a series of agricultural disasters.

While stressing the continuity of Soviet policies, the new leaders may be prepared to adjust some of his policies with more innovative approaches, according to some observers here. There are, however, several factions within the leadership and it is by no means clear at this time which one of them is going to prevail ultimately.

While the Brezhnev era has been one of stability and peace, a combination of circumstances and problems has begun to crowd in on the leadership during the past year. Food shortages have brought about widespread disaffection and stimulated corruption which, judging by official press accounts, has risen to new highs. There were signs of significant grumbling among the military chiefs about Brezhnev's peace policy in the face of what is seen here as a relentless American arms buildup accompanied by hostility.

During the past few weeks of his life, Brezhnev seemed to have yielded to the pressures from the armed forces by shifting Soviet foreign policy. He strenuously courted China while moving toward a new buildup of Soviet armed forces.

The greater emphasis on domestic vigilance and discipline was the traditional medicine for domestic economic ailments. While his three predecessors imposed radical changes from above -- in Stalin's case with the help of violence and mass terror -- Brezhnev had sought to reach a consensus and restore traditional values.

His style of leadership was always predictable, favoring stability over radical approaches and stability over reform. While curbing the power of the political police, he at the same time seemed tolerant of incompetent party officials.

Younger and better-educated officials have become increasingly frustrated with what was seen here as an immobility at the top and rejection of new ideas in nearly all fields.

In contrast to the free-wheeling style of Nikita Khrushchev, whom he replaced in 1964, Brezhnev's approach was to seek a consensus among other leaders. He assumed the role of the ultimate arbiter among different groups and showed supreme skills as a political pro in reconciling various interests. In this sense he managed the political process without the prerogatives of one-man rule, emphasizing order and regularity of procedure.

Apart from his innovative foreign policy, this was perhaps his main achievement. After 40 years of turmoil, war and upheavals, during his 18-year long stewardship the average Russian had a chance to have a little peace and quiet, hopes for a better future and more legality in his life.

Yet the source of his strength may have been a great weakness at this point when the economy appeared to be in need of major changes and adjustments and when the leadership also appeared to be unable to come up with any new radical approaches.

Brezhnev apparently never recovered fully from an illness last March and his obvious infirmities -- and occasional inability to assert himself in physical terms -- seemed to symbolize the inability of the leadership to decisively cope with the onslaught of problems.

His death, for all practical purposes, reduces the number of Politburo members to 10. Arvid Pelshe, at 83 the oldest member of that body, has been ill and practically out of action. Andrei Kirilenko, 76, was quietly ousted two weeks ago.

Aside from Shcherbitsky, the Ukrainian leader, the other Politburo members include Andrei Gromyko, 73, Viktor Grishin, 68, Grigory Romanov, 59, Dinmukhamed Kunaev, 70, and Mikhail Gorbachov, 51, the youngest member who is in charge of the agricultural sector.