Alexei N. Kosygin, 76, who died in a Moscow hospital Friday, was the premier of the Soviet Union from the fall of Nikita S. Khrushchev in 1964 until last October, longer than anyone to hold that position since the founding of the Soviet state.

There was no official announcement of his death in the Soviet press Friday. Sources who reported his passing could not give a precise cause, but it is known that Mr. Kosygin had severe heart ailments in recent years.

Although Mr. Kosygin spent more than 40 years in the upper reaches of the Soviet hierachy -- he owed his early prominence to Joseph Stalin and survived the bloodlettings that were a feature of the dictator's final years -- it was only when he became premier that his name and face became widely known.

With Leonid I. Brezhnev and Nikolai V. Podgorny, Mr. Kosygin orchestrated Khrushchev's ouster in October 1964. Khrushchev had been leader of the Soviet Communist Party and head of the government. Brezhnev became head of the party -- always the most powerful position in the Soviet Union -- and now also is president of the nation. Podgorny took the largely ceremonial presidency, a position from which he was dropped in 1977. Mr. Kosygin became premier.

A story is told about Mr. Kosygin at that time that illustrates his anonymity, as distinct from his vast responsibilities. He visited a fish processing plant at Pitsunda on the Black Sea. The guard did not recognize him and refused him admittance until he received permission from a "higher" authority. It is virtualy inconceivable that an average Soviet citizen would not have recognized Khrushchev, not to mention Stalin, had either made a similar visit.

Mr. Kosygin, who had made his earlier career as an economist and technocrat, quickly emerged on the world stage. Much of his diplomatic activity was devoted to the Third World and to other communist countries. In 1965, he traveled to Peking to meet Mao Tse-tung, the Chinese communist leader and the challenger of the Soviet Union for leadership of the world communist movement. In January 1966, he initiated the Tashkent conference which ended the Indian-Pakistani war of 1965.

In 1967, following Israel's spectacular victory over the Arabs in the Six-Day War, Mr. Kosygin visited the United States and met President Lyndon B. Johnson at Glassboro, N.J. The purpose of each side was to ease the tensions arising from the conflict in the Middle East.

In 1969, Mr. Kosygin traveled to Hanoi for the funeral of Ho Chi Minh, the president of North Vietnam. While he was there, the United States bombed North Vietnam, an act that was criticized by some as a gratuitous insult to the Soviet leader. On his way back to Moscow, Mr. Kosygin stopped briefly in Peking for a talk with Premier Chou En-lai about worsening conditions along the Sino-Soviet border. Relations between the two giants of the communist world remained acrimonious.

At home, Mr. Kosygin sought to decentralize parts of the economic planning process, thereby making it more efficient and more responsive to consumer needs. The problems he faced, among others, included lagging productivity, a declining number of workers and the need to modernize industry. In the end, the changes came to little or nothing, having been resisted by the bureaucracies of party and government alike.

It is said that in the internal deliberations of the Kremlin Mr. Kosygin opposed the invasion of Czechoslovakia in 1968. In any case, he visited the country before and after the Soviet-led military intervention.

By these and other activities, Mr. Kosygin came to be regarded by many Soviets and westerners as a liberal in matters both domestic and foreign. This despite his dour and businesslike appearance -- Andrei D. Sakharov, the dissident Russian physicist, called Mr. Kosygin the "most intelligent and the toughest" of the Soviet leaders. Some analysts believe that the liberalism attributed to Mr. Kosygin accounts for his becoming less importance in all spheres, beginning about 1970, than Brezhnev.

The relative change in the position of the two men became abundantly clear in 1972 when President Richard M. Nixon went to Moscow to sign the first agreements relating to strategic arms limitations and initiating the period of U.S.-Soviet detente. For the Soviet side, only Brezhnev signed the protocol, although at that time he held no significant position in the government.

In his memoirs, "The White House Years," Dr. Henry A. Kissinger, who was Nixon's national security adviser during the Moscow talks, offers this assessment of Mr. Kosygin:

"Of Brezhnev's colleagues Kosygin was by far the most impressive. Though subordinate to Brezhnev in power and authority and not charged with conducting definitive talks on sensitive issues, he spoke on them with assurance and always with great precision . . . Among our own experts Kosygin had the reputation of being more liberal than Brezhnev. On the basis of my contact with him I considered that a superficial judgment . . . . Outside the economic area, on foreign policy questions, for example, Kosygin struck me as orthodox if not rigid. It seemed almost as if he compensated for managerial progmatism by the strictest piety on ideological matters."

So what were the reasons for Mr. Kosygin's relative decline in influence? According to Prof. Adam Ulam of Harvard University, a leading student of Soviet affairs, they may never be known. What can be said, according to Ulam, is that it is the dynamic of the Soviet system for all power eventually to devolve into the hands of a single leader. Stalin became the supreme leader after Lenin. After a period of shifting alliances, Khrushchev emerged as the principal successor to Stalin, leaving Marshal Nikolai A. Bulganin in obscurity. So it has been with Brezhnev.

Not the least of Mr. Kosygin's accomplishments was his ability to survive near the top for as long as he did. Kissinger suggests that one of the reasons was Mr. Kosygin's undoubted competence and that another is that most of his career was in the government rather than the party, although he held a position in the highest party councils for many years. Another factor, according to no less an authority than Khrushchev, was luck.

In his memoirs, Khrushchev recalls the last purges of the Stalin years. Many of the victims were from Leningrad, or had held high positions there. Mr. Kosygin himself was born in that city. In the wake of the terrible purges of the late 1930s, he was named mayor of Leningrad. Yet he was spared during the terror surrounding the so-called "Leningrad Affair" of the late 1940s.

"As for Kosygin, his life was hanging by a thread," Khrushchev wrote. "Men who had been arrested and condemned in Leningrad made ridiculous accusations against him . . . wrote all kinds of rot about him . . . The accusations against him cast such a dark shadow over him that I simply can't explain how he was saved from being eliminated along with the others. Kosygin, as they say, must have drawn a lucky lottery ticket, and this cup passed from him."

In the event, Mr. Kosygin survived to resign as premier of the Soviet Union, pleading failing health. His last public appearance was on Aug. 3, when the Moscow Olympic Games ended.

Alexei Nikolayevich Kosygin was born in St. Petersburg in 1904. It is said that his father was a lathe worker. In 1919, two years after the Bolshevik Revolution, he joined the Red Army for service in the Civil War. He graduated from a technical school in Leningrad in 1924 and spent the next several years working with cooperatives in Irkutsk and elsewhere in Siberia. He joined the Communist Party in 1927.

In 1935, he returned to Leningrad, became a foreman in a factory, and in 1936 graduated from the Leningrad Textile Institute.

In 1938, he was named mayor of Leningrad. A year later, he was elected to the Central Committee of the Communist Party and at the same time was placed in charge of the textile industry. In 1940, he was named a deputy premier.

During World War II, he held a number of high posts concerning the removal of Soviet industry to the Urals and beyond, where it would be safe from the invading Nazis. He also was given major responsibilities during the war and in the immediate postwar years for food rationing. In 1943, he became premier of the Russian Socialist Federated Soviet Republic, the largest of the constituent republics of the Soviet Union.

His rise in the party continued apace. In 1946, he was elected an alternate member of the Politburo, the inner circle of the party apparatus. He became a full member in 1948, shortly before Stalin unleashed his fury against the Leningrad group.

Mr. Kosygin's only serious setback, so far as is known, came in 1952, a year before Stalin's death. At that time, he was demoted to alternate member of the Politburo and in the following year he was dropped from its membership altogether.

In 1955, however, Khrushchev had Mr. Kosygin installed as a deputy premier and named him the head of Gosplan, the state economic planning agency. In 1957, he was restored to alternate membership on the Politburo, then called the Presidium. He became a full member in 1960 and at the same time was put in overall charge of the economy and named first deputy premier.

It was from this position that he helped to topple Krushchev.

It is a convention in the Soviet Union to keep the private lives of public persons entirely from public view. A rare exception to this came about in Mr. Kosygin's life rather by accident. He was on the reviewing stand atop Lenin's Tomb in Red Square in Moscow in 1967 when he received word that his wife, Klavidya, had died, and this became known. He remained on the stand until the parade was ended. But at her funeral, he was seen to bend over her coffin and kiss her.

Mr. Kosygin's survivors include a daughter, Ludmilla, who is married to Dzherman Gvishiani, the deputy chairman for the state committee for science and technology.