The United States, Russia and six other world powers agreed today on the text of a U.N. Security Council resolution to end the conflict in Kosovo, and Pentagon officials reported the first signs that Yugoslav forces were preparing to withdraw from the shattered region.

Within hours of the agreement, NATO and Yugoslav generals resumed talks in Macedonia on a timetable for the Yugoslav pullout and other technical military matters. That set in motion a process that could lead within days to an end of 11 weeks of NATO airstrikes on Yugoslavia and the deployment of NATO peacekeeping troops in Kosovo.

The five-page resolution clarifies disputed details of the peace plan that Belgrade had accepted last week, and the foreign ministers of the eight nations -- the Group of Seven industrial democracies and Russia -- immediately referred the document to the Security Council.

Even as the agreement was reached here, NATO bombing continued in Yugoslavia, and the Pentagon reported escalated fighting between separatist Kosovo Albanian guerrillas and Yugoslav forces near the southwestern town of Junik. On Monday, several hundred Yugoslav troops may have been killed when an American B-52 dropped cluster bombs on forces massed near the Kosovo-Albania border, NATO sources said. (Story on Page A19.)

The draft resolution satisfies one of NATO's key demands for a settlement to the conflict by specifying a complete withdrawal of Yugoslav troops and Serbian police and paramilitary forces from Kosovo, a province of Serbia, Yugoslavia's dominant republic. NATO and other international peacekeepers will enter the province to safeguard the return of hundreds of thousands of ethnic Albanian refugees who have been driven from their homes and lands. The resolution also says that all countries should cooperate with the U.N. war crimes tribunal, which has indicted Yugoslav President Slobodan Milosevic for his role in the Kosovo violence.

"We got what we came for," Secretary of State Madeleine K. Albright declared after the meeting. German Foreign Minister Joschka Fischer called the agreement a "genuine breakthrough," and British Foreign Secretary Robin Cook said the text of the resolution "enables us to escape the stalemate on how to proceed with the peace process."

Passage of the resolution by the Security Council is likely, diplomats said, although China expressed some reservations. Foreign ministers were still cautioning, however, that Milosevic must make good on his pledge to pull troops out of Kosovo. "It all depends on compliance, verifiable compliance," Albright said.

The agreement came after 12 hours of talks over two days and is the culmination of weeks of negotiations between NATO leaders and Russia. When Moscow agreed to the alliance's key positions, it shut off Belgrade's best hope for outside support. Russia had objected in particular to NATO's demand that alliance troops form the core of the Kosovo peacekeeping force.

Although the body of the U.N. resolution does not mention NATO, annexes to the document mention a force with "substantial NATO participation" and in practice will mean NATO leadership of the peacekeepers, Albright said. The annexes carry the same authority as the main body of the resolution text, she said.

Russian Foreign Minister Igor Ivanov said his country's participation in the peacekeeping force is still under discussion. Deputy Secretary of State Strobe Talbott was to leave Washington for Moscow Wednesday to continue talks on that subject.

Albright said Russian participation is welcome, and she cited the precedent of Russia's role in Bosnian peacekeeping operations. But she said Russian troops would be integrated into the international security force in Kosovo. There would be no separate Russian sector, she said, and NATO forces would have to be involved throughout the province.

Russia continues to express strong opposition to the NATO bombing, but Ivanov said Russia would support the resolution in the Security Council nevertheless.

"These types of documents cannot fully satisfy those who participate," Ivanov said. "We had one main goal -- to get an end to the war in the Balkans and move the settlement of the conflict into the political arena." He said Russia would be satisfied if the agreement fulfills the goal of ending the war "as soon as possible."

Russian President Boris Yeltsin spoke with President Clinton for the second time in as many days today and emphatically repeated Moscow's demand for an immediate NATO bombing pause. Clinton thanked Yeltsin for encouraging Ivanov on Monday to make a deal in the Cologne talks.

The next step in ending the war will now come in Macedonia, where Yugoslav and NATO military officers are working out technical details for a rapid withdrawal of Belgrade government forces from Kosovo.

[Talks between officers from both sides began late today and continued through the night. A brief recess was called near dawn Wednesday to allow the Yugoslav officers to consult with their government leaders on specific facets of the plan. One NATO source said the two sides were "dealing with minutia" all night long.]

British Lt. Gen. Mike Jackson, commander of NATO forces in Macedonia, had told reporters earlier that once the military agreement is signed and the deployment is approved by the U.N. Security Council, engineer units will be sent into southern Kosovo within hours to begin neutralizing land mines. Their initial task will be to clear the road between the Macedonian border and Pristina, the Kosovo capital.

But progress at the talks was slow, and no immediate results were announced. Still, a NATO spokesman said, "There is no reason they cannot sign the agreement tonight." The nine-member Yugoslav delegation was led by Col. Gen. Svetovar Marjanovic, deputy chief of staff of the army.

In Washington, Pentagon officials said no Yugoslav withdrawal from Kosovo had begun but that there were signs the vehicles were being moved into position to transport troops out.

Once NATO sees sufficient evidence of a full-scale pullout, it will halt the bombing campaign. Only then, according to NATO's interpretation, will the U.N. Security Council formally vote on the resolution text agreed upon today, thus circumventing Russian and Chinese demands that the bombing stop before the vote for the resolution. Cook called Security Council adoption a "formality."

In Washington, President Clinton said that "a verifiable withdrawal of Serb forces will allow us to suspend the bombing and go forward with the plan."

This could take place over the next couple of days if Milosevic follows through on his agreement last week to pull his forces out of the province. "Unless he's totally tone deaf, he should be getting the message that it's time to withdraw," Albright said.

NATO military briefers said, however, that Yugoslav army forces continue to move against ethnic Albanian guerrilla forces in sharp fighting near the Albanian border. In another potential complication, the Yugoslav Foreign Ministry said Belgrade wants its own soldiers stationed at the Kosovo borders to take part in determining which refugees are allowed to return to the province. That proposal was flatly rejected by the foreign ministers here.

"The Serbs will in no way be able to control who goes into Kosovo," Albright said.

"What he [Milosevic] wants . . . is to stop the bombing without delivering his side of the bargain. We're not going to let him get away with that," Cook said.

Finnish President Martti Ahtisaari, the European Union's Balkans envoy, met in Beijing today with President Jiang Zemin and Foreign Minister Tang Jiaxuan to seek support for the resolution from China, one of five nations with veto power on the Security Council. Ahtisaari said that "questions were raised" that "went to the heart of the whole process."

"NATO must immediately halt the bombing of Yugoslavia as a necessary precondition for solving the Kosovo crisis," said Foreign Ministry spokeswoman Zhang Qiyue. The state-run New China News Agency said that Jiang spoke to Yeltsin by phone and that Jiang insisted on "the respect and guarantee of Yugoslavia's sovereignty and territorial integrity."

Ahtisaari reiterated that NATO would not suspend its bombing campaign until there is a "verified" Yugoslav troop withdrawal. But if Belgrade and Moscow support the resolution, and if the vote is delayed until a bombing halt begins, most diplomats consider it unlikely that China would exercise its veto.

Highlights of the foreign ministers' agreement include:

Making the document a "Chapter 7" U.N. resolution, meaning the peacekeeping force can carry heavy weapons and use "all necessary means" to carry out U.N. mandates; the force will make reports to the secretary general but will have its own independent command structure.

Twice mentioning the war crimes tribunal, including a clause about the obligation of U.N. member states and the international security force to fully cooperate with the war crimes tribunal.

Calls for the "demilitarizing" of the Kosovo Liberation Army and other armed ethnic Albanian groups.

The establishment of a civilian administration run by the United Nations.

Calls for a donor conference to raise money for the economic reconstruction of Kosovo.

Leaving vague the long-term future political status of Kosovo. In one clause, the resolution reaffirms the "sovereignty and territorial integrity" of Yugoslavia -- whose leading republic, Serbia, includes Kosovo province. In another clause, however, the resolution pledges "substantial autonomy and self-government in Kosovo" and "a political process designed to determine Kosovo's future status, taking into account the Rambouillet accords."

Those accords, forged in France in March, said that an international conference would address Kosovo's political status after three years -- implicitly raising the possibility of the eventual independence of the province.

Anticipating possible problems in winning full cooperation of Kosovo Albanians, Albright met this morning with three ethnic Albanian leaders to secure their commitment to laying down arms, refraining from attacking retreating government forces and working democratically within a Kosovo that will for the foreseeable future be an international protectorate.

Correspondents Michael Dobbs in Belgrade and R. Jeffrey Smith in Kumanovo, Macedonia, and staff writers John M. Goshko at the United Nations and Bradley Graham and John F. Harris in Washington contributed to this report.

CAPTION: Madeleine K. Albright welcomes Russian participation in the peacekeeping force.