NATO formally declared an end to its air offensive against Yugoslavia following the departure of the last Yugoslav troops from Kosovo today, as leaders of the Group of Seven leading industrial democracies and Russia announced a major effort to rebuild the war-battered Serbian province.

Within hours of those actions, NATO officials and Kosovo's separatist ethnic Albanian guerrillas reached agreement on a plan to demilitarize the rebels, a key objective of the Western alliance as it seeks to build a lasting peace in the territory.

Ending the eight power summit here, German Chancellor Gerhard Schroeder said he would organize another such meeting in the Balkans this fall to stress the group's determination to bring stability and democracy to the volatile region.

"Peace will only be possible there if, after the silencing of the weapons, we move quickly to promote the kind of economic and political integration in the Balkans as we enjoy in the West," said Schroeder, whose nation holds the Group of Seven presidency until the end of the year.

The three-day G-7 summit -- Russian took part on the last day -- concluded as the last of 40,000 Yugoslav army troops and Serbian police withdrew from Kosovo, towing broken-down tanks and other vehicles across the northern border into Serbia proper about 11 hours earlier than a mandated midnight deadline.

"At 1 o'clock this afternoon, the commander [of the NATO peacekeeping force in Kosovo], Lt. Gen. Mike Jackson declared . . . that, with the exception of a few stragglers, all Yugoslav uniformed forces have now withdrawn from Kosovo," a NATO spokesman told reporters in Pristina, the provincial capital.

With the Serb-led Yugoslav government having met the withdrawal timetable it agreed to with NATO commanders on June 9, alliance Secretary General Javier Solana issued a statement announcing he had "decided to terminate with immediate effect the air campaign." The air assault against Yugoslavia, which lasted 78 days, was suspended on June 10 as the first Yugoslav and Serbian forces began to leave Kosovo, a province of Serbia, Yugoslavia's dominant republic.

In another sign that the threat of armed conflict might be diminishing, U.S. national security adviser Samuel R. "Sandy" Berger announced the agreement with the Kosovo Liberation Army, which calls for the ethnic Albanian guerrillas to turn over their heavy weapons. The NATO force in Kosovo and the KLA "have agreed on an understanding of demilitarization and transformation" of the guerrillas, Berger told reporters here, saying the agreement still required approval by the North Atlantic Council, NATO's decision-making body.

[The agreement was signed in Pristina early Monday by Jackson and KLA leader Hashim Thaqi, news services reported. It requires the rebels to place in storage within 30 days any weapon larger than a rifle, and to refrain from carrying even small arms in many parts of Kosovo. The accord also mandates that the KLA maintain a cease-fire, defer to NATO peacekeepers on security issues and expel foreign members of their organization.]

A senior Clinton administration official said agreement on the plan was reached early this morning following negotiations in Macedonia that involved senior KLA officials and top Western aides, including State Department spokesman James P. Rubin. Officials said Secretary of State Madeleine K. Albright sent Rubin to the talks because of the working relationship he has established with Thaqi.

Here in Cologne, Russian President Boris Yeltsin said Moscow wants to collaborate with the West on building a new and lasting peace in the Balkans, despite the fact that it disagrees vehemently with NATO's decision to bomb Yugoslavia, a Slavic nation whose people share deep historic and cultural ties with Russia.

Russia's new apparent willingness to work with the United States and its European allies was signaled on the eve of the summit, when U.S. and Russian negotiators reached agreement on the terms under which 3,600 Russian troops will serve in the NATO-led peacekeeping force in Kosovo. The pact, which calls for Russian soldiers to operate in sectors controlled by France, Germany and the United States as well as to help run the airport at Pristina, prescribes an unprecedented degree of military cooperation between Moscow and the Western alliance.

Schroeder, Clinton and other leaders emphasized that Russia's involvement was essential in any effort to create and guarantee peace in Europe. They said that the strategy of seeking Moscow's help in persuading Yugoslav President Slobodan Milosevic to pull his forces out of Kosovo -- which was endorsed at NATO's 50th anniversary summit in Washington two months ago -- had clearly paid off.

The leaders pledged they would cooperate with such institutions as the European Union, the 55-nation Organization for Security and Cooperation in Europe and the United Nations in forging a "stability pact" for Yugoslavia and its neighbors. "We consider this stabilization process to be one of the major political and economic challenges ahead of us. We declare our readiness to take strong action to achieve all the objectives of the stability pact," they declared in a final statement.

What remains unclear is the extent to which the eight powers are willing to back up their commitments with hard cash. The European Union's executive commission estimates that it may take at least $2 billion to rebuild Kosovo and provide more than 1 million ethnic Albanian refugees with access to basic food and shelter in their home villages.

But commission experts believe that long-term costs of economic reconstruction for all of Yugoslavia and its neighboring states may require an investment as high as $30 billion over the next six to eight years. The 15 nations of the European Union have declared their willingness to absorb most of the reconstruction costs, particularly since the United States bore most of the expense for carrying out the bombing campaign. A donors conference is scheduled for next month.

While Russia urged that Serbia be allowed to share in the reconstruction aid, the United States and key West European nations insisted they would not help rebuild any Serbian infrastructure destroyed by NATO bombs as long as Milosevic remains in power.

In a concession to Yeltsin, the final summit statement did not include a specific prohibition on reconstruction aid to the Milosevic government. But the United States, France, Britain, Italy, Canada, Germany and Japan made it clear that they would resist providing any assistance that would help prop up Milosevic and his ruling clique.

"Reconstruction aid, reestablishment of economic structures and reincorporation into Europe need democratization, and that is not possible with Milosevic," Schroeder said. Nonetheless, various leaders offered significant nuances between reconstruction aid and humanitarian relief.

British Prime Minister Tony Blair, who adopted the most aggressive position among the allies during the bombing campaign and was the most forceful advocate of sending ground troops if necessary to defeat Milosevic, said the Serbian population must share part of the blame for the brutality and repression waged by their political and military leaders against Kosovo's ethnic Albanians. He indicated that until the Serbs bring down Milosevic or compel him to surrender to the U.N. war crimes tribunal in The Hague to face charges, they should not expect to receive Western aid.

"The more we see what has happened in Kosovo, the more we see that the Serbian people have got a responsibility to make Milosevic culpable," Blair said. "They cannot walk away from these crimes."

Blair urged that Western funds should be funneled to those front-line states that supported NATO in the conflict. He cited above all Albania and Macedonia, two of Europe's poorest countries, which absorbed hundreds of thousands of refugees despite their economic and social fragility. But he also mentioned Bulgaria and Romania, which allowed NATO planes to use their airspace.

Other leaders, however, said it was important to show sympathy and generosity toward the Serbs to defuse anti-Western resentments in Yugoslavia. "The Serb citizens are victims, and to give some humanitarian relief is a matter of helping people," said Canadian Prime Minister Jean Chretien. "If there is a big problem of food and starvation this winter, I would not say no because of Milosevic."

Schroeder expressed a similar view. "We have to differentiate. If somebody is cold, you give him a blanket even if he is your enemy. If he is starving, you give him food."

Clinton, who was described by members of other delegations as curiously detached from the summit proceedings, seemed to hover somewhere between the two schools of thought. Berger said the United States would probably be willing to supply food and medicines through the Red Cross or other international relief agencies.

Even though virtually all Serbian and Yugoslav forces have left Kosovo, tensions between Serbian and ethnic Albanian civilians remained high in many towns and communities where Serbs remain. In the northern Kosovo city of Mitrovica -- one of the last to be vacated by Yugoslav forces -- civilian Serbs and ethnic Albanians had set up roadblocks in their respective sides of town, refusing to permit access to each other's territory.

French paratroops placed a line of tanks between the two feuding sides. "We're in the middle, and we don't know what to do," said Cpl. Beyrouti Talal, who was manning the NATO checkpoint.

Correspondent Molly Moore in Pristina and staff writer Charles Babington in Cologne contributed to this report.

CAPTION: Canadian Prime Minister Jean Chretien, left, and Russian President Boris Yeltsin clasp hands at conference table during summit's closing ceremony.