In the soft elegance of the White House library, President Reagan was waiting impatiently for the words. Just a few minutes remained in the three-day summit with Soviet leader Mikhail Gorbachev, but first they had to approve the final language on the issue Reagan held so dear, his dream to build a defense against nuclear missiles.

The president was handed a draft of the document and read the words, but said he could not see a difference from earlier versions of the joint statement. He listened to Secretary of State George P. Shultz explain that both nuclear superpowers could pursue their missile defense programs "as required."

Reagan then turned to Lt. Gen. Colin L. Powell, his national security adviser. "Mr. President," Powell said, "I think we're fully protected."

With that, Reagan said yes. He walked out and met Gorbachev, who had been across the hall in the Map Room with his advisers. Surrounded by aides they quietly shook hands, and the words were sealed.

Only 14 months before, Reagan and Gorbachev had argued and eventually stumbled into bitter recriminations over just one word, "laboratory." In the final moments at the Reykjavik summit, the Soviet leader wanted to bottle up Reagan's missile defense system, the Strategic Defense Initiative (SDI), in the laboratory, and Reagan walked out.

But at the Washington summit they had found a way out of the semantic box. They had not settled their great differences over nuclear and space defense, but they had found two new words to live by: "as required."

This was less than Reagan wanted. Just three days earlier, on the day Gorbachev arrived, Reagan had approved a secret directive setting forth much broader negotiating objectives in the space defense area than he was able to achieve in the meetings with Gorbachev. By the same token, Gorbachev was unable at this summit to obtain his goal of putting limits on the U.S. antimissile program. The result was that, at least for now, each side will go its own way in the space defense area.

These final moments spoke volumes about the Washington summit. This 16th meeting of U.S. and Soviet leaders since Franklin D. Roosevelt and Josef Stalin first met in the throes of World War II, the third such summit on U.S. soil, and third summit between these two men, did not mark a great breakthrough in the long, difficult history of the relationships between the two nations. As the two crucial words suggested, it was a summit of pragmatic advances, of measured steps along a path that had been marked out in Geneva in 1985 and Reykjavik in 1986.

As they stood under umbrellas in the rainswept South Lawn of the White House at the meeting's end on Thursday afternoon, both Reagan and Gorbachev proclaimed it a success.

For the first time, the two most important and most heavily armed nations of the nuclear age had signed a treaty to eliminate a whole class of nuclear missiles, in this case medium-range and shorter-range missiles.

After four years of bitter and sometimes bombastic argument, the two nations for the first time seemed to approach a live-and-let-live accommodation in the controversial area of space defenses. The week's bargaining here may have opened the way for a far more sweeping and ambitious accord that both sides are seeking in the six months ahead: a 50 percent reduction in long-range, or strategic, nuclear arms.

Moreover, the Washington summit appears to have been an important landmark on the road to an improved political understanding between the United States and the Soviet Union. Reagan and Gorbachev celebrated their Intermediate-Range Nuclear Forces (INF) Treaty with cordial ceremonies and personal warmth in stunning contrast to the bitter rhetoric heard from both capitals in the early Reagan years. The peoples of the two countries, amazed and for the most part delighted with the new cordiality, responded with applause for Gorbachev on the streets of Washington and appreciative words for Reagan in the streets of Moscow.

According to more than a dozen senior U.S. and Soviet participants, the Washington summit was intricately programmed so the two leaders could talk to each other and to their world audience, while leaving the delicate bargaining almost entirely to subordinates. As it happened, there were surprises everywhere -- in the personal chemistry between them, in the hard negotiating behind the scenes, in the carefully planned events that went awry and the spontaneous gestures that paid unexpected dividends.

Almost from the outset, the summit took on a life of its own. For all the detailed planning that went into it, the course of events followed an unpredictable path. For example, on Tuesday afternoon, Reagan and Gorbachev signed the INF Treaty in high spirits. But their first major business meeting that afternoon, after the signing, got bogged down; at one point 34 people crowded into the Cabinet Room, nothing was getting accomplished, and chief of protocol Selwa Roosevelt was admitting people "like a traffic cop," recalled an aide. "It was a disaster."

Frustrated, Reagan decided to hold no more big meetings and to begin the next day with Gorbachev in his private study, with only interpreters present.

To those who participated, the summit also played out in quiet, unforgettable experiences with the Soviets.

For example, after Reagan and Gorbachev had finished lunch on Thursday, they were waiting in the Red Room of the White House for final language in the joint statement to be delivered from the working group, which was still haggling. Suddenly, Gorbachev got up and headed for the door, along with Kremlin foreign policy adviser Anatoliy Dobrynin. It was quickly explained to U.S. officials that the Soviet leader was heading for the lavatory.

There was just one problem -- they would have to find their way downstairs to the nearest men's room. Would they need an escort? Dobrynin indicated this was unnecessary. He had served as Soviet ambassador to the United States for 24 years and even had once had his own parking space in the State Department's underground garage. He would take Gorbachev.

"I know my way around," he said.Reagan's New Tone

For weeks, the White House speechwriters had been searching for Russian stories and sayings to use in the president's speeches. Gorbachev had barely arrived at the White House when Reagan tried out the first one. In his welcoming remarks, Reagan recalled a World War II Soviet general who told the story of a soldier who said he captured a bear, and was asked to bring it along.

"I can't," replied the soldier. "The bear won't let me."

Like the soldier, Reagan explained, "our people for too long have been the masters and the captives of a deadly arms race. The situation is not preordained and not part of some inevitable course of history. We make history."

With this speech, Reagan struck a tone for the summit much different than the confrontational one he had sounded in the weeks before the meeting, when he vowed not to give up SDI and accused the Soviets of treaty violations. The shift was deliberate. A senior White House official said Reagan "was playing to a world audience" now, not a domestic one, and his staff had eliminated any remarks that could be seen as offensive to the Soviets. Reagan has always paid careful attention to his speeches, and the weekend before the summit he took most of the drafts home to read.

To the surprise of Reagan's advisers, Gorbachev responded to Reagan with strikingly similar words, saying the leaders had a duty to "undo the logic of the arms race by working together in good faith."

As five waves of news photographers came through the Oval Office on Tuesday morning, Reagan and Gorbachev apparently sensed they were headed in the same direction. They disagreed about many things, but they had just announced very similar goals. "Well, obviously, we want to make progress," Reagan said. "I think both of us made that clear out there in our remarks."

But the outward celebration at the treaty-signing ceremony that afternoon masked the difficulties the two leaders had to confront in their talks. Reagan had for weeks been planning to lead off in his first one-on-one meeting with an appeal to Gorbachev for progress on human rights. When he did, he found the Soviet leader defensive. Gorbachev recalled later that he told Reagan, "Mr. President, you're not a prosecutor, and I'm not an accused."

At the embassy later that afternoon, senior Soviet officials gathered to look ahead at the rest of the summit. They were pleased with the atmospherics and with Reagan's new rhetoric, but pensive about where the summit would go on arms control. "Already on the first day, we could see that the mood was going to be just right, but that the perimeters of what we could get done were quite limited," said a senior Soviet official.

From this point on, the official said, the Soviet goal was to preserve the mood while trying to lock in restrictions on SDI or "Star Wars" space tests -- the same restrictions, they hoped, that Congress recently imposed through next Oct. 1, which effectively enforce the traditional, or "narrow," interpretation of the 1972 Antiballistic Missile (ABM) Treaty.

At the White House, aides were concerned over the way the big Tuesday meeting had stalled. Very early Wednesday morning, Shultz, Powell and White House chief of staff Howard H. Baker Jr. gathered in Powell's office. They distilled the key points from Reagan's big briefing books into "talking points" the president could use with Gorbachev that day on arms control. They wanted to avoid another rambling session.

This was emblematic of their approach to the entire summit. It was "designed so that the technicalities would be handled by the technicians," said a senior White House official. Reagan was told, "Let us deal with details," recalled this official, whose advice to the president was, "Just remember who you are, remember what you believe and where you want to go. The rest of it will follow in turn."

The official added, "I do know that he made no effort to involve himself in detail here . . . . You know, he had briefing books stacked inches high on his desk. I urged him to . . . depend on us to provide that. He did very well."

When the president invited Gorbachev into his personal study Wednesday morning, he followed the advice. Although notetakers were excluded, Reagan is understood to have posed a question to Gorbachev, asking whether the Soviet leader wanted to roll up his sleeves and try to solve some problems, or simply talk about their ideological differences. Reagan said he wanted to take the workmanlike approach, and that subordinates of both leaders would be watching.

While Gorbachev met with American publishers at the Soviet Embassy, Reagan privately took time out Wednesday afternoon to tape a segment of the nationally televised speech he would give after the Soviet leader had left the country. The reason was that White House aides were planning to put a video graphic into the speech, highlighting the INF Treaty, and they needed the president to read aloud the words that would accompany it, so they could calculate precisely how long the graphic would be on the air.

Reagan obliged, but later, a problem cropped up. Some National Security Council staff members wanted to qualify the missile counts he was to use in the speech. But they were told it was too late -- because of the graphic, the words were locked in.Hard Bargaining on Arms

For all the U.S. emphasis placed on human rights, settlement of regional conflicts and bilateral issues, the central issue at the Washington summit was the future of the vast arsenals of nuclear weapons that undergird the global standing of the two leading nations of the postwar world.

To advance the complex negotiations about the control and reduction of these devastating weapons, Reagan and Gorbachev at their first meeting Tuesday morning named an arms control working group of experts.

This group, which had worked together effectively at Reykjavik and at several meetings in Washington and Moscow since, was headed by U.S. arms adviser Paul H. Nitze, who wrote the basic U.S. postwar plan for containment of the Soviet Union in the 1950s and has decades of experience in dealing with Moscow, and Marshal Sergei Akhromeyev, chief of the General Staff of the Soviet armed forces, who calls himself "the last of the Mohicans" in active Soviet military service since World War II.

The basic job of the working group was to make major strides toward a new treaty to reduce U.S.-Soviet strategic, or long-range, nuclear arms by up to 50 percent. Reagan and Gorbachev have vowed to try to sign this ambitious accord at a Moscow summit in the first half of 1988.

The working group convened at the State Department Tuesday afternoon shortly after the INF signing ceremony at the White House and worked throughout the day on Wednesday and from 11 p.m. to 12:30 a.m. On Thursday at 8 a.m. Nitze and Akhromeyev met at the Soviet Embassy with Shultz and Soviet Foreign Minister Eduard Shevardnadze to report what the experts had accomplished, and what remained to be resolved.

Considerable progress had been made in the working group on the outlines of a plan to verify compliance with deep cuts in strategic weapons, the principal item on the superpowers' arms control agenda, and rules for counting the long-range missiles on each side.

The most important subjects remaining were the specific ceiling on land-based and submarine-based ballistic missile warheads, where the two sides were not far apart, and the fundamental dispute over space defense, an intractable argument between the two nations since Reagan unveiled his Strategic Defense Initiative, the plan to build a defense against ballistic missiles, in March 1983.

The previous Friday afternoon, Reagan had met with his senior foreign policy and military advisers in the forum of the National Security Planning Group to prepare the U.S. positions for the summit. Reagan issued a secret memorandum on Monday, the day of Gorbachev's arrival, setting forth the U.S. bargaining strategy.

Reagan hoped to move toward a separate treaty on space defense issues, disconnecting the subject from the offensive arms reductions. But if this could not be done -- and in fact the Soviets refused to move in this direction -- Reagan set out these U.S. objectives in the space defense area:Soviet acceptance of a U.S. right to conduct "testing in space as required" as part of the preparations for SDI, andSoviet agreement that the United States would be permitted to deploy SDI defenses after the end of an agreed period of years during which neither nation could withdraw from the 1972 ABM Treaty.

Both these positions had been put forward by the Pentagon in interagency negotiations, and both were opposed by the State Department, which favored less ambitious objectives. Reagan had adopted the Pentagon view.

The Soviets, as State expected, adamantly refused to accept these two bids for acceptance of Reagan's "Star Wars" plan. A U.S. official who was not present but who was briefed on the discussions said that at one point in the talks, Soviet arms adviser Viktor Karpov snapped that he had heard all this before and demanded that the U.S. negotiators "stop wasting my time."

At the meeting at the Soviet Embassy early Thursday morning, according to several administration officials, Shultz and Nitze agreed to drop the demand for an explicit Soviet acceptance of "testing in space." They also dropped their demand for an explicit right to deploy missile defenses at the end of the specified period in which both sides would continue observing the ABM Treaty.

In return, Shevardnadze tentatively agreed to a more ambiguous statement that each side "will be free to decide its own course of action" at the end of this period. As written, this does not rule out a Soviet increase in offensive weapons to offset U.S. strategic defenses if they are ever deployed.

Nitze and Shultz also continued to push for Soviet approval of the right of either side to explore space defense by "conducting their research, development and testing as required, which are permitted by the ABM Treaty." In the U.S. view, this language would strengthen the administration's claim that it could conduct realistic tests in space under a broad interpretation of the ABM Treaty, although its meaning was not as clear as the original U.S. formula.

Shultz and Nitze left the Soviet Embassy to brief Reagan at the White House, where Gorbachev was expected at 10:30 a.m., shortly after having breakfast with Vice President Bush and his friends. But about that time, a Soviet aide called from the embassy to say Gorbachev was considering what Shultz and Nitze had reported, and would be 15 to 20 minutes late. A bit later the Soviet Embassy called again and said Gorbachev suggested the convening of another working group meeting, this one a more confidential session involving only a few officials.

In all, Gorbachev dropped out of sight at the Soviet Embassy for nearly two hours, while Bush waited patiently so they could return to the White House together. A Soviet aide later told a U.S. official that the Soviet leader used part of that time to communicate with the Politburo in Moscow.

Gorbachev and Bush finally left for the White House more than 90 minutes late in the Soviet leader's boxy ZIL limousine. As they got into the car, Gorbachev told Bush he called the limousine his "bunker."

As they rolled along the streets of midtown Washington, Gorbachev was enjoying the waves he got from the clusters of people on the sidewalks and leaned forward to return them. Bush remembers saying, "It's too bad you can't stop and go into some of these stores, because I think you'd find warm greetings from the American people."

A block or two later, at Connecticut Avenue and L Street NW, Gorbachev yelled something in Russian to the KGB security guard in the front seat. The big ZIL stopped. According to Bush, Gorbachev threw open his car door, jumped out and began shaking hands.

"I've been around the political track a lot and the adrenaline was flowing, and you could see it," Bush said later. "And he liked it and was pleased with the reception . . . . I said, 'Do you do this a lot?' He said, 'Oh, I do it a lot. I do it in Moscow and I do it every time I go to the provinces. So I believe in it. I believe that's the way you ought to do it. Leaders should be equal.' "

When the motorcade finally arrived at the White House, Reagan quipped to Gorbachev, "I thought you'd gone home." Gorbachev smiled and said, "I had a chat with a group of Americans who stopped our car." Later he told Reagan that his brief stop on Connecticut Avenue had made a great impression. "Looking at the American faces, seeing their interest and friendliness, made me understand that the American people wish us well," Gorbachev said, according to an American who was present.

As the two leaders strolled on the White House grounds and then conferred over lunch, six arms-control officials met in the White House Cabinet Room to bargain on strategic and space arms. On the Soviet side were Akhromeyev and special arms adviser Karpov; for the United States, Nitze, arms negotiators Max M. Kampelman and Ronald F. Lehman, and Col. Robert E. Linhard of the National Security Council staff. When the bargaining got to its final stage, Shultz and Shevardnadze were called out of the luncheon with the leaders to join the Cabinet Room discussion.

With the pressure mounting sharply -- the clock was ticking toward 2 p.m., when the two leaders were scheduled to say goodbye at the end of their meetings -- the crucial deals began to be made. According to several U.S. participants, they were:The Soviets insisted that the two nations agree to observe the ABM Treaty "as signed and ratified." Shultz argued that the issue of what was meant when the treaty was ratified was a domestic dispute between the administration and Congress, and the Soviets should keep out of it. Shevardnadze gave in, agreeing to delete the words "and ratified." Shultz repeated the U.S. position that the ABM Treaty permits research, development and testing "as required," and said it was essential to obtaining Reagan's approval of any communique. The Soviets finally agreed, although they made it clear they do not accept the U.S. interpretation that these words justify realistic space weapons tests. Shevardnadze had earlier indicated the Soviets could accept an accord under which each side would be "free to decide its course of action" if and when it finally withdraws from the ABM Treaty. But now the Soviets balked at agreeing to this. Secretary of Defense Frank C. Carlucci, who had joined the meeting, read from notes in which Gorbachev had used a similar formulation in a discussion with Reagan earlier in the summit. With this, the Soviets gave way. The United States had demanded a statement that, in effect, could permit either side to withdraw from the ABM Treaty for such purposes as space testing. The Soviets refused to accept it. The United States gave in. The Soviets had demanded that limits be established on sea-launched cruise missiles, a fast-growing type of nuclear weapon, but the U.S. side insisted that compliance with such a limit cannot be verified. In a compromise, the sides "committed themselves to establish ceilings on such missiles" and agreed to seek ways to verify them. The United States had proposed that the total of land-based and submarine-based ballistic missile weapons allowed by a new strategic arms treaty be limited to 4,800 warheads on each side. The Soviets had discussed the possibility of a 5,100-warhead limit. Now in the Cabinet Room the Soviets said a compromise on 4,900 or 5,000 warheads might be worked out as part of a "package deal" encompassing other elements.

After some discussion, the two sides agreed on 4,900 ballistic missile warheads for each side in a new treaty. The United States has about 8,000 such warheads and the Soviet Union about 10,000 -- thus such a cut would be a massive reduction, dwarfing the cuts called for in the newly signed INF Treaty.

Having made these arrangements, the U.S. and Soviet teams set out to find their leaders. Cryptic Hint on Nicaragua

While the arms-control teams were wrangling, Reagan and Gorbachev carried out another small drama in a walk around the White House grounds.

Originally, White House aides had conceived of the idea as strictly a photo opportunity, showing the two men alone. But Reagan also had business on his mind.

According to a senior White House official who later spoke to the president, the two leaders talked about Afghanistan and Nicaragua. The official said he was told that Gorbachev repeated that he had made a political decision to get out of Afghanistan "and that they will set a timetable to do it." But he also set conditions, including a halt of U.S. aid to the rebels.

"And the president's reply was in effect that we ain't gonna leave the resistance unprotected . . . . That conversation never went much further than that."

The final meeting of the summit took place in the Family Dining Room after the much-photographed walk around the grounds, and Afghanistan and Nicaragua were again topics of discussion.

A major development on the Afghanistan issue, as U.S. officials see it, is that the Soviets are no longer citing the need for "national reconciliation" inside that war-torn country as a condition for withdrawing their 115,000 troops.

At lunch, according to a senior U.S. aide, "Gorbachev acknowledged that the essential linkage is between withdrawal and noninterference" by outside forces after the withdrawal begins. "Gorbachev also acknowleged that national reconciliation is a process, not an event" and so it should not be a requirement for the withdrawal of Soviet troops to begin.

On Nicaragua, a surprising and intriguing, though brief, discussion took place at the luncheon table.

According to an authoritative U.S. account, Reagan suggested that their joint summit statement report that the Soviet Union has agreed not to supply arms to Nicaragua.

According to this account, Gorbachev counterproposed: "Why don't we say that the two sides accept and support the Contadora accords and the Guatemala accords {also known as the Arias plan} and that we agreed to look at practical measures that would contribute to implementing these accords?" Gorbachev added, "In the process of working together, they could agree to stop supplying arms to Nicaragua except for small arms."

It was not clear whether Gorbachev was speaking only of a Soviet halt to supplying Nicaragua with arms, as some U.S. officials interpreted his remarks, or whether he was referring to a halt to U.S. supplies to the contras as well.

Gorbachev spoke only about two sentences on the subject, and one official considered it "a rather cryptic statement . . . a casual comment." No American followed up, and it remains unknown how serious Gorbachev was and exactly what he had in mind. Nonetheless, Gorbachev's willingness to even discuss limitations on Soviet arms supplies to Nicaragua represents a possible diplomatic opening that could be the basis for important negotiations.

After lunch, chief of staff Baker slipped away to the usher's office and called Powell to find out how the arms control talks were proceeding. Powell told Baker that there were still problems and more time was needed. Baker was worried.

"I got an antsy president over here and a jumpy general secretary and how much more time do you need?" he asked Powell, according to an informed source.

When the leaders got through dessert, Baker realized he needed to change plans. He suggested that Reagan and Gorbachev move into the Red Room for a while. They "looked a little surprised by that," but they went, the official said, and swapped some stories while waiting. Reagan said he had watched the television reports of the Soviet leader's impromptu stop on Connecticut Avenue. It looked like what Americans call "working the crowd," Reagan said with a smile.

The working groups were still not finished. The two leaders moved on to join their wives in the Blue Room. They waited. Finally, Baker was told that the Soviet team wanted to meet briefly alone with Gorbachev on the final language. The chief of staff sent the Soviets downstairs to the Map Room, and Reagan went down to the library to get the report from Shultz and Powell. It was at this point that Powell assured Reagan that his SDI program was "fully protected" and that the president approved the joint statement describing the deals that had been made.

This done, Reagan and Gorbachev headed for the door to the departure ceremony in rain outside.

Both of them hailed the summit as a success of historical proportions. They called attention to the INF Treaty they had signed, the progress they had made toward a strategic arms accord of massive scope, and of the improved relations between the governments and peoples of the United States and the Soviet Union.

Their last-minute accommodation on space defense was not mentioned by either leader.

In fact, they did not conquer the differences between them in this area though they seemed to find a way to put them off to a later day. Of the arrangement that became the central compromise of the 1987 Washington summit, chief U.S. arms negotiator Kampelman said later: "They kicked the can down the road."