Juan Antonio Samaranch, a polished and soft-spoken diplomat currently Spain's ambassador to the Soviet Union, was elected president of the International Olympic Committee (IOC) today, succeeding Lord Killanin of Ireland.

Meanwhile, in Washington, President Carter still is trying to prevent any display of the American flag or the playing of the Star-Spangled Banner at the Moscow Games, according to a State Department spokesman.

Lloyd Cutler, a presidential adviser, has written to Monique Berkioux, executive director of the IOC, to ask that the flag and anthem not be used, said State Department spokesman John Trattmer. Madame Berlioux said Tuesday that protocol requires the display of the flag of the nation playing host to the next Olympic Games. The 1984 Games are to be held in Los Angeles.

Samaranch, who will be 60 on Thursday, will take office for an eight-year term as chief executive of the Olympic movement after the closing ceremonies of the boycott-diminished Games of the 22nd Olympiad that begin here Saturday and end Aug. 3.

Sources said that Samaranch, a wealthy former industrialist and banking-real estate consultant, will resign his ambassadorial post by Nov. 1 and reside in Barcelona, whose city parliament he once presided over.

He is expected to devote full time to his unpaid duties as IOC president during what is certain to be a turbulent period for international sport.

IOC insiders do not anticipate that he will be a strong president, but his diplomatic skill could be instrumental in healing rifts that have occurred because of the boycott of the Moscow Games by the United States and about 50 other nations protesting the Soviet invasion of Afghanistan.

quiet and reserved, Samaranch, is known as a clever behind-the-scenes negotiator who is unfailingly discreet and guarded in his public statements.

True to form, he declined to elaborate on goals or plans for his administration during a brief press conference following his election. He carefully sidestepped sensitive or provocative questions and made no policy statements, reminding reporters several times: "I am here as the president-elect. I have not assumed office yet."

Killanin's term officially ends when the olympic flame is extinguished and the Moscow Games are declared closed. However, it is one of the IOC's unwritten but sacred traditions that the mantle of leadership is actually passed in a private ceremony when the outgoing president turns over to his successor the keys to the Chateau de Vidy, the 18th century mansion on the shores of Lake Geneva at Lausanne, Switzerland, which serves as IOC headquarters.

Samaranch said this probably would take place within a week after the Moscow Games, either in the Soviet capital or in Lausanne, and that he would not answer substantive questions until he was duly installed.

He made it clear, however, that he will delegate even more authority than did Killanin. The committee-minded Irish peer broadened the influence of the national Olympic committees and international sports federations in Olympic decision-making, taking the IOC far from the autocratic rule of the late Avery Brundage, the arch-conservative American millionaire who ruled with an iron hand and shrill voice for 20 years until Killanin took over in 1972.

"I think I can do something for the Olympic movement but I am not used to work alone," said Samaranch. "I am not used to work with other people." Asked if this meant he would ask the other 84 members of the IOC to work more diligently than they have in the past, he replied: "Yes, I will ask them to work harder."

Samaranch is the eighth president of the IOC, and the first Hispanic to preside over the fiercely independent, old-fashioned, self-perpetuating body that owns and oversees the Olympic Games. He was elected on the first ballot over three other candidates: Willi Daume of West Germany, Marc Hodler of Switzerland and James Worrall of Canada.

A fifth announced candidate, Lance Cross of New Zealand, withdrew before the secret vote was taken.

Cross remained a candidate for vice president along with Worrall, but the 77 members present elected Louis Guirandou-N'Diaye of the Ivory Coast, currently that country's ambassador to Canada. He became the first black to hold an IOC vice presidency.

The IOC has three vice presidents, who serve for staggered four-year terms. With today's election, Vitaly Smirnov of the Soviet Union became first vice president, replacing Muhammad Mzali, now prime minister of Tunisia, whose term expired.

Guirandou-N'Diaye, 57, is a former Fulbright scholar in the United States and five-time delegate to the United Nations General Assembly, as well as a black belt in four martial arts. His hobbies, according to his officials IOC biography, are judo, karate and poetry.

Samaranch's only listed hobby is collecting stamps with a sports theme, but the day clearly belonged to him.

A shrewd, tactful man whose many sporting offices include the presidency of the Spanish Roller Skating Federation and vice presidency of the International Roller Skating Federation, he had quietly but eagerly spent several years laying the groundwork to succeed Killanin in the most elite post in international amateur sport.

An IOC member since 1966, he has been chief of protocol for nine of the last 12 Years, and president of the IOC Press Commission since 1974.

Killanin introduced Samaranch to the horde of journalists, some of whom cynically compared the ritual to the emergence of a newly elected pope. Samaranch spoke briefly in French, the official language of the IOC, pledging to carry on the "delicate work" of the sprawling Olympic family.

Besides Spanish, Samaranch also speaks English and some German and Russian. His own sporting activities have included hockey, skiing, shooting, yachting, equestrianism and boxing. He is an avid golfer, and was largely responsible for getting the IOC to recognize roller skating, a sport that he would not mind seeing in the Olympics some day.

His chief task will be to try to heal the schisms that have been caused by the boycott over the Moscow Games. His first major assignment will be to preside over the olympic Congress at Baden-Baden, West Germany, in the autumn of 1981, where the IOC, national Olympic committee and the international sports federations will come together to confront urgent and mounting problems.

Among the issues are the political exploitation of international sports, the growth and commercialization of the Olympics to perhaps unmanageable proportions, the proliferation of drugs in sports, and the pressing need for rules reforms. The IOC must next year choose sites for the 1988 Winter and Summer Olympics, and decide whether or not to seek permanent homes for the Games in the future.

Some people think that the problems are insurmountable, that the Olympics as we now know them cannot be saved. Samaranch, naturally, does not agree.

"Although there are certain difficulties that we have to go through," he said today in his best diplomatic manner, "I am confident that the Olympic flag will go higher and higher and higher on the pole."

In other developments today, Peter V. Ueberroth, president of the Los Angeles Olympic Organizing Committee, said he was "very confident" after discussions with the IOC and Soviet sports officials that there would be "no recriminations against the Los Angeles Games" because of the U.S.-led boycott of the Moscow and Games.

Ueberroth, who also said today that Los Angeles would put on the Olympics without any funds "from any governmental body in the United States of America," may also have unwittingly created a storm at home when he sided with the IOC in its dispute with the U.S. government over the use of the flag in closing ceremonies.

Ueberroth backed the IOC position, while insisting that the Los Angeles delegation has no direct role in the closing ceremonies.

"I believe that the Ioc is the owner of the Olympic Game and the Olympic ceremonies and, as the owner, I think they have the right to do as they please with those ceremonies." he said.