MOSCOW, SEPT. 19 -- The new flexibility shown by the Kremlin that led to the first U.S.-Soviet arms control agreement in nearly a decade appears to reflect Soviet leader Mikhail Gorbachev's confidence in his own grip on power and his desire to achieve major arms accords with Ronald Reagan rather than wait to deal with a new American president.

Soviet arms specialists and western diplomats here also discerned a clear Soviet shift away from the single-minded objective of holding back President Reagan's Strategic Defense Initiative, or "Star Wars," and toward broader, more tangible disarmament goals as the main factor clearing the way for a summit.

The policy changes marked a turnabout from Moscow's position in arms negotiations with the United States a year ago, when the Reykjavik, Iceland, summit broke down over a dispute about Star Wars. Gorbachev complained then that it would be a "scandal" to hold a summit in the United States while Reagan was barreling ahead with plans to build a space defense shield against nuclear weapons.

Western diplomats said the Kremlin concessions that clinched agreement in principle to scrap medium- and shorter-range nuclear missiles, offered by Soviet Foreign Minister Eduard Shevardnadze in his meetings this week with Secretary of State George P. Shultz, demonstrated an urgent need for Gorbachev to produce some tangible achievements in his high-profile disarmament policy.

The arms deal and forthcoming summit with Reagan should boost Gorbachev's stature with Soviet citizens, who are still waiting to see improvements in their lives from a multitude of new economic reforms, as well as with the foreign leaders who will be visiting Moscow soon to observe celebrations of the Soviet Union's 70th anniversary.

The Kremlin's new, more flexible disarmament stance also seems linked to a shake-up of senior military leaders last spring, in the view of some western military experts here.

The shake-up, prompted by a young West German pilot's landing on Red Square in May, allowed Gorbachev to begin replacing an older generation of Defense Ministry officials with younger officers more supportive of his long-term disarmament goals.

Before those personnel shifts, Moscow had resisted some concessions that U.S. officials said would help prove the Kremlin's interest in disarmament, such as including all Soviet Asian-based nuclear warheads in the treaty.

Since the shake-up, Moscow has dropped its objection to eliminating the warheads in Asia and to other obstacles blocking progress in the arms talks.

One example of increased flexibility on the part of the Soviet military, diplomats said, was the unexpected decision two weeks ago to allow U.S. congressmen to visit and photograph a Soviet radar facility at Krasnoyarsk, which had been closed to westerners.

"Someone at the highest level is pushing through compromises which the military was able to successfully block before," said one senior western diplomat who closely follows arms control issues.

The Soviet military also has begun to mirror Gorbachev's predilection for summitry. Since Dmitri Yazov replaced Sergei Sokolov as defense minister at the end of May, Moscow has stepped up its proposals for a meeting between Yazov and Secretary of Defense Caspar W. Weinberger. At a news conference yesterday in Washington, Shevardnadze repeated the invitation. Weinberger has not responded.

By far the biggest change, however, is the virtual disappearance of the Soviet campaign against Star Wars.

Before the Geneva summit two years ago, Moscow argued that Star Wars was the single greatest obstacle to U.S.-Soviet arms control agreements. In his first meeting with Reagan, Gorbachev said the American president's intractable commitment to the space system contradicted his expressed interest in arms control and clouded the chances for agreements. The only prospect was for a treaty to cut back on intermediate-range missiles on both sides.

A campaign of attacks against Star Wars ensued, climaxing at Reykjavik last year when Gorbachev made even that treaty hostage to restrictions on Star Wars by insisting that the two be negotiated together.

Soviet officials have made few public attacks against Star Wars in recent weeks, however. In an article published Thursday in Pravda on the Soviet Union's disarmament objectives, Gorbachev's only reference to strategic defense was indirect and guarded. He said that an agreement to cut strategic weapons would be linked to "strict observance" of the 1972 Anti-Ballistic Missile treaty, viewed as the mechanism for limiting space research on both sides.

The reason for the shift, some Soviet arms control experts have explained, is that the campaign against Star Wars became more an impediment than a catalyst to arms control. "We just got fed up with concentrating on it," one Soviet official said, "and decided to spread out our interests to other areas where progress looked more possible. If progress is achieved in other areas, it will eventually be achieved in the area of space defense, too."

Stiff opposition to Star Wars research remains, however, particularly because of the fear that it will lead to the development of the kind of sophisticated military hardware that Moscow would be at pains to match. During the talks in Washington, Soviet officials raised a few new proposals for placing limits on the research.

The Washington talks also appear to mark the end of a longstanding Soviet taboo against seeking a wide range of other arms agreements with Reagan.

The policy now is to broach as wide a range of strategic agreements as possible, Soviet officials have explained, on the principle that achieving agreements in the post-Reagan period may prove even more difficult.

The strategy seems to be the result of brainstorming in Moscow about the prospects of Democratic presidential contenders. Fourteen months before Americans go to the polls, Soviet specialists regard the chances for election of a Democrat who is more flexible than Reagan on arms control to be not at all certain.

For the first time this week, Gorbachev indicated that an agreement to cut strategic weapons by 50 percent on both sides may be possible in the first half of next year, in addition to agreements in the works to limit nuclear testing and chemical weapons production.

At the same time, Soviet officials also have hinted at plans to renew attempts to negotiate reductions in the British and French nuclear arsenals.