NATO'S steadfastness in Kosovo, and President Clinton's, may be paying off. The Yugoslav government yesterday accepted an agreement that, if implemented, could end the war on satisfactory terms. All the usual cautions, and then some, are in order. The deal is unclear in some aspects, and Slobodan Milosevic could well try to break the agreement, as he has broken his word before. NATO is right to keep bombing until he actually complies. But if his troops, police and paramilitary forces withdraw from Kosovo as promised and if NATO remains as determined in shaping the peace as it has been in waging this war, something important will have been accomplished. The West will have showed that this time, in this place, it would not stand for crimes against humanity.

The key elements of the agreement are those that Mr. Clinton has repeated with welcome consistency: Serb forces out, NATO troops in. These principles do not arise from any desire for conquest or territorial aggrandizement but from practical considerations: Only under such conditions will a million terrorized Kosovars return to their homes. The agreement properly calls for a withdrawal of Serb troops but would then allow a small number to return to Kosovo as a symbol of Yugoslav sovereignty. But "hundreds, not thousands," will be allowed to return -- too few, in other words, to intimidate the returning deportees if the NATO protection force is sufficiently robust.

If Mr. Milosevic has indeed essentially accepted NATO's terms, there will be time enough to analyze why. One accomplishment already is clear: U.S. diplomacy helped draw an angry Russia back from the fringe of the international order to a place where it can, if it chooses, once again play a constructive role. President Boris Yeltsin or his entourage deserves credit for realizing that Russia's interests were better served by long-term cooperation with the West than by association with a doomed despot in Belgrade. It was Mr. Yeltsin who appointed Viktor Chernomyrdin as peace envoy when Russia's then-prime minister, Yevgeny Primakov, seemed more intent on foiling NATO; and it was Mr. Yeltsin who outmaneuvered and deposed Mr. Primakov himself. But NATO diplomats led by U.S. Deputy Secretary of State Strobe Talbott also deserve credit for making space for Russia in the process. In the end, Moscow's tacit support for NATO's terms left Mr. Milosevic completely isolated.

There remain too many unanswered questions to breathe easily yet. Even if Mr. Milosevic withdraws his troops, will the "essential NATO participation" spelled out in the agreement translate into a NATO-led, NATO-propelled force, or will a weaker force emerge with a more diffuse command structure? How will the withdrawal of Serbian paramilitaries, many of them guilty of gruesome crimes against civilians, be verified? Will the involvement of the U.N. Security Council and its Russian and Chinese members lead to a fuzzing of roles? Serbian officials, for example, can be allowed no say in determining who returns to Kosovo. And NATO must cooperate enthusiastically with the International War Crimes Tribunal as it seeks to prosecute and arrest war criminals -- the indicted Mr. Milosevic first and foremost.

Only when he is in the dock in the Hague, after all, can the Balkans truly hope for peace and stability. NATO's resolute pounding of Serbian forces may now succeed in returning Kosovars to Kosovo. By other means, the West now must push for democracy in Serbia, and just as resolutely.