WEST BERLIN, JULY 21 -- Even before he landed in Moscow, Helmut Kohl knew something was cooking, something good.

In the eight months since the Berlin Wall had opened, German, American and Soviet politicians had been shuttling to public summits and secret sessions -- from Moscow to Maine, from Britain to Berlin. The goal of this rush of diplomacy had been to persuade Soviet President Mikhail Gorbachev that a large and economically powerful German state would not threaten Soviet security, even if the new Germany belonged to the NATO military alliance.

Now, on Sunday morning, July 15, in Moscow, Kohl awaited Gorbachev's response. There were promising signs: Gorbachev had invited Kohl to travel with him later that day to the Caucasus, the Soviet leader's birthplace, an emotional journey no foreign leader -- let alone a German -- had yet made. By that afternoon in Stavropol, the usually formal Gorbachev had taken off his tie and dressed in casual clothes -- a small sign that something extraordinary had taken place.

That decisive Sunday had been a long time coming. This article, based on accounts from German, Soviet, American and British participants in the extensive negotiations, traces the Kohl-Gorbachev accord reached last week on the unification of Germany from the opening of the Berlin Wall through the extraordinary web of diplomatic contacts in which Soviets and Germans had the leading roles, but in which Americans also turned out to be key players.

The Kohl-Gorbachev breakthrough was above all a triumph of high-level personal diplomacy -- Soviet, German and American, officials said. Over the past eight months, leaders of the three nations have seen more of each other than they have some of their closest friends, according to their aides. U.S. Secretary of State James A. Baker III and West German Foreign Minister Hans-Dietrich Genscher met 11 times and spoke by phone on dozens of other occasions. President Bush and Kohl came face-to-face four times. There were eight sessions between Baker and Soviet Foreign Minister Eduard Shevardnadze, three Baker-Gorbachev meetings and two superpower summits.

Through all these meetings, the central task was to find out what Gorbachev needed before he would approve German unity -- and then deliver it.

A final deal did not seem imminent when the leaders met Sunday morning at the elegant, pre-revolutionary Soviet guest house in Moscow. Only six people were present: Kohl, Gorbachev, two note-takers, two translators. They began a methodical review of the last few diplomatic meetings.

Chancellor Kohl expected to hear that the Soviets were closer, that everything could surely be worked out, but that there were still some kinks. Despite progress, the signals from Moscow had been maddeningly contradictory. Gorbachev kept changing the conditions under which he would agree to NATO membership for the new Germany.

Kohl had a major concession in his pocket. He was ready to tell Gorbachev that a united Germany would voluntarily limit its military forces to 370,000 troops -- a move the Germans had resisted, wanting to reduce their army only along with other countries, as part of international talks in Vienna.

But less than two hours into the first session at a long table laden with flowers, Gorbachev spoke up. One of the participants in the meeting recalled that electric moment.

"He told the chancellor he was ready to move," the official said. "All of us expected the breakthrough to come in September. And now it was here. The chancellor did not even have the discussion about the size of the military until after Gorbachev said he was ready."

The outlines of the deal were emerging. Germany would be a member of NATO. Germany would limit its own forces. Germany would provide the Soviets with massive financial and technical aid. Germany and the Soviet Union would sign a treaty establishing a new relationship between two countries that had devastated each other in World War II.

But much detail work remained. Gorbachev and Kohl haggled over military matters on their 2 1/2-hour flight that afternoon to Stavropol in Gorbachev's home district. They appeared for a picture-taking session in casual clothes, but they continued discussions late into the night; their foreign ministers met until well past midnight.

The accord would not be announced until the next day, after Kohl and Gorbachev walked the rich earth of the Caucasus, land that German troops occupied 48 years ago.

From that moment on, the chancellor could not stop smiling. He wore the huge grin of a little boy, even in public.

He was the chancellor of German unity.After the Fall of the Wall The German diplomatic tour de force began last November, shortly after the fall of the Wall, when Kohl suddenly announced his plan to end the division of Germany. Hoping to build on the grass-roots revolution that had swept Communist regimes from power in Eastern Europe, Kohl proposed a measured, gradual unification over several years. But the West German leader had not informed his allies of what he was about to say, and in Paris, London and Washington, the speech came as a shock.

Within days, however, the United States and West Germany were scampering to rally the Western alliance around unification, a goal they had always supported, at least rhetorically. "Even if one thought Kohl was moving too fast," a U.S. official said, "we had to engage."

While NATO nations wrestled with the dissolution of the postwar structure of Europe, the Soviets argued over who had lost their key strategic and economic ally, East Germany.

The two blocs staked out positions that seemed far apart. NATO -- including the West Germans -- wanted a united Germany firmly anchored in the West. The Soviets feared their worst nightmare was coming true: the rise of a strong Germany, clearly aligned against Moscow.

But the two sides were never quite that far apart. By Jan. 30, Gorbachev had all but accepted unification in theory, saying "no one casts any doubt upon it."

"It was not a problem to convince Gorbachev that a united Germany within NATO was less threatening than a Germany in splendid isolation," contended a West German source. "The problem was one of politics: convincing Gorbachev's critics and the Soviet man on the street. They were prisoners of their own propaganda about a threatening NATO, and we had to help them out of that prison."

The help developed from the closest German-American cooperation of the postwar period. Before each contact with the Soviets, Bonn and Washington officials consulted by phone, on paper and in person.

Baker and Gorbachev met in Moscow just before Kohl's first visit there in February. To prepare Kohl for the trip, Baker gave him a memo outlining Gorbachev's concerns, emphasizing the need to assure the Soviets that Germany's borders are permanent.

Baker had tried to persuade Gorbachev at that February meeting that a neutral Germany could be more of a military threat, possibly pursuing nuclear weapons on its own, than if it were secured within the alliance. Only NATO, Baker said, could make sure that Germany would move "not one inch" eastward. Would Gorbachev rather have a powerful, prosperous Germany that was neutral and arming itself, Baker asked, or one snugly within the confines of the Western alliance?

Gorbachev was noncommital. He talked about the deep Soviet fear of the Germans, the devastating impact of the Nazis, the deaths of millions upon millions.

Kohl went to Moscow in February armed with Baker's analysis of the historical shadows that followed Gorbachev. Kohl and Gorbachev share a generational legacy -- each is the first leader of his country too young to have experienced the war as an adult. But they were by no means close.

Their meeting was cordial enough, but the Soviets still insisted on a neutral and demilitarized Germany. Still, Kohl came away encouraged: Gorbachev had agreed that German unity should be resolved largely between Germany and the Soviet Union, rather than primarily through the broader international process. That meant they could do business, the chancellor thought, according to his aides. The Six-Way Talks Begin Meanwhile, Genscher and Baker independently moved to start talks on the new Germany and the end of the postwar order. The final formula was a series of six-way talks, including the two Germanys and the four victorious World War II powers: Britain, France, the United States and the Soviet Union.

Through the late winter, the Western alliance debated the package that NATO and West Germany would offer Gorbachev. At Camp David on Feb. 24 and 25, Bush and Kohl combed over every aspect of the German position -- whether a united Germany would have nuclear weapons, how large an army it would keep, how it would guarantee the Polish border. They tried to predict every Soviet objection. On most issues, Bush and Kohl agreed.

But Kohl was still playing domestic politics. He was refusing to commit a united Germany to the current East German-Polish border. Kohl's approach appealed to millions of Germans who consider the old East Prussia, now Polish territory, the real "Eastern Germany." The Americans were angry at Kohl's behavior but muted their concerns. Events were moving too quickly to risk a split with Bonn.

Meanwhile, the Soviets floated one objection after another. At one meeting, participants said, Baker grew impatient with Shevardnadze, who had been waxing eloquent about the price the Soviets paid in World War II.

"What is it specifically that you need?" Baker implored Shevardnadze.

Genscher wanted to offer the Soviets a package including financial aid and food supplies, a commitment that Soviet contracts with East Germany would be honored, a revamped NATO, troop cuts and a device to include Moscow in the new Europe. That was the CSCE, the Conference on Security and Cooperation in Europe, a 35-nation group that had no previous security role.

At first, the United States resisted, worrying that the CSCE would be unwieldy and threaten NATO's role as the foundation of Western security. Then, in March, Genscher and Baker met in Washington and agreed that the CSCE could prove to Gorbachev that the West did not seek to take advantage of the repeated blows Soviet defense strategy suffered in the East European revolutions of 1989.

But the next major step forward was not a new concession. Rather, it was a series of personal encounters.

On May 14, Kohl's top foreign policy aide, Horst Teltschik, secretly met with Gorbachev in Moscow. He outlined the emerging German offer, including not only feeding and supplying the 360,000 Soviet troops in East Germany for several years, but building housing back in the Soviet Union for returning soldiers.

Teltschik, searching for a way to build the Kohl-Gorbachev relationship, reminded the Soviet leader that when he visited Bonn in June 1989, Gorbachev had invited Kohl to visit his home district in the Russian south. Perhaps now is the time, Teltschik said. Gorbachev only listened. The Summit in Washington The Bush-Gorbachev summit in Washington at the beginning of June raised the temperature on the German question, but brought no breakthrough. Indeed, U.S. officials concluded that Gorbachev was not ready to deal. Gorbachev's discussion of Germany was rambling and, to the Americans, discouraging.

But the Germans soon heard that Gorbachev had come home with a vastly different impression, perhaps because of the intimate conversations at Camp David. According to the Germans, Bush seemed to have persuaded his Soviet counterpart that neither the United States nor NATO intended to take advantage of Moscow's weakness.

"Don't underestimate the power of such personal invitations," a top West German said. "That's where these men learn trust."

This thread of personal, high-level contact is woven throughout the Germany negotiations, and some officials argue that it marks a relatively new development in global diplomacy: close and often informal discussions among top leaders, often to the exclusion of staff members who have traditionally handled such talks.

On June 5, Baker and Shevardnadze met in Copenhagen. Shevardnadze, ready to talk details, said it would be easier for the Soviets to make a deal on troop reductions if they got a commitment that the German army would be strictly limited.

"We suddenly got a very different flavor from the Soviets," a U.S. official said. "Shevardnadze talked about how a Germany in NATO would be a Germany that the Soviet Union could have good relations with."

Elated, Baker called Genscher at his hotel. Genscher's staff said he was asleep. They woke him up. Baker went racing over to the hotel to tell him what he had heard.

Two weeks later, the elation had subsided. The Soviets were waiting to see what came out of the NATO summit in early July. In East Berlin at the six-way talks on June 19, foreign ministers heard Shevardnadze insist on continuing Four Power responsibility over Germany for years after unification.

After the meeting, Baker asked Shevardnadze for an explanation. "I told my boss you guys were coming around," Baker said, according to a source who was present, referring to what Baker had advised Bush earlier. Shevardnadze replied that what he had presented was a Politburo document that was basically out of date.

Shevardnadze added that any progress on Germany would have to wait until after the 28th Communist Party congress, where Gorbachev's conservative critics were expected to blame the president for losing Eastern Europe and weakening his country strategically.

In Bonn, meanwhile, the Germans were intent on presenting Gorbachev with an offer covering his every concern. The NATO summit in London July 5 and 6 produced a strong statement redefining the mission of the alliance and even inviting Gorbachev to visit its headquarters. The statement also included a surprise German acceptance, in principle, of unilateral limits on the size of its army after unification.

Then there was the tricky issue of economic aid. Teltschik had left Moscow convinced that Gorbachev wanted Kohl to show leadership in the construction of a Western aid package for the Soviets. So, at the Houston summit in mid-July, Kohl, along with French President Francois Mitterrand, lobbied the other major economic powers for $15 billion in aid.

Kohl and Mitterrand lost their fight for the full Soviet aid; the Americans, British and Japanese were too worried that the money would vanish in the sinkhole of the Soviet economy. But the Germans had tried.

Kohl and Genscher knew that reshaping NATO and offering a $3 billion credit from German banks were not enough. The Soviets were not moving until they knew that Germany had committed itself to a small military. The Soviets mentioned numbers as low as 200,000, about a third of the troops of the combined German armies.

That was ridiculously low, Bonn officials said. On July 4, Kohl, Genscher and Defense Minister Gerhard Stoltenberg met without aides. Stoltenberg was ready to offer a troop ceiling of 400,000. Genscher would go further, to 350,000. Kohl listened and decided that 400,000 would not mollify the Soviets. He would go to Moscow with a 370,000-troop offer.

Still, all the face-saving measures in the world could not have brought the Soviets to Kohl's splendid Sunday in Moscow. Gorbachev's early about-face was also the result of the Soviet leader's political purge of his conservative enemies at home.

For two weeks before the Kohl visit, conservative Communist Party leaders had mounted the podium at the 28th party congress to blame Gorbachev for letting communism crumble in their back yard.

Gorbachev and his allies fought back. Moscow's choice, Shevardnadze said, was to work with the West toward a secure Europe, or use Soviet troops in East Germany to block reunification. He chose the first.

By the close of the party congress, Gorbachev had trounced his conservative rival Yegor Ligachev, the loudest opponent of German NATO membership. Party delegates voted Ligachev and other hard-liners out of the powerful Central Committee.

"Gorbachev was emboldened by victory at the congress," a West German diplomat said. "He told us he was now free to follow his own policy."

The first hours in Moscow Sunday had Kohl floating on air. In Stavropol -- where the Nazis in 1942 rounded up hundreds of Jews and shot them on the town square -- Gorbachev and Kohl met with veterans at a war monument, making the case for leniency toward Germany. Gorbachev told the veterans that because he and Kohl had lived through the war, they had a responsibility to secure Europe against any recurrence of that horror.

Monday morning, after Kohl gave the Soviets as much as four years to pull their troops out of East Germany, Gorbachev accepted that Germany would achieve full sovereignty at the moment of reunification -- not years later, as the Soviets had insisted.

Gorbachev wanted the Germans to see him as reasonable. The more lenient he was now on the German question, the stronger basis he would build for Soviet-German economic relations later.

The result was the sweeping away of the final obstacle to German unity, a firm Western orientation for the new Germany and a new German-Soviet relationship.

The first two achievements won applause in the West, despite British and French grumbling about the Germans and Soviets making their own deal. But the other outcome, the new ties between Moscow and Bonn, met with quietly nervous reaction in many quarters, including Washington. Diplomats wondered what might have been left unsaid in the Kohl-Gorbachev deal. Had Kohl agreed to push for a nuclear-free Germany?

The West Germans say there is no secret deal. In fact, chancellery sources say Kohl will push this fall for faster European monetary union than anyone has yet envisioned -- an attempt to prove once again Germany's commitment to the West.

In Moscow and Bonn, there was a sense of inevitability that the foundation of the new Europe would be built by Russians and Germans. From Czar Alexander I to Otto von Bismarck, from Vladimir Lenin to Willy Brandt, German and Russian leaders have often believed that their two countries hold the key to European power and security.

"Lenin said that when you have Germany, you have the world," a West German official said. "The Soviets are still acting on that. Now, between us, we have to show that this idea of a united Europe can really work." Fisher reported this article from Germany, Hoffman from Washington. Correspondent Gary Lee in Moscow contributed.