THE LAST SERB troops are slated to leave Kosovo tonight, but even if they keep to their schedule NATO won't have much time to celebrate. Instead, it will turn its full attention to the challenges the Serbs have left in their wake: an invigorated Kosovo Liberation Army, resentful Russian generals, a devastated landscape, a million and half displaced Kosovars and a need to gather evidence and fix accountability. In all this, NATO has to respect the views of not only its 19 members but also of the U.N. leadership that will take charge of Kosovo's civil reconstruction.

The KLA presents one of the most sensitive challenges for NATO peacekeepers. The unofficial army of Kosovo independence played a key role in dislodging Serb forces from Kosovo. It most likely enjoys considerable support among civilians and, as a political organization, could play a positive role in reconstruction. Indeed, many of its fighters appear to be helping already as they assist thousands of forced deportees returning to devastated towns and villages.

But the dark side of the KLA also has been visible in these early days, with reports of KLA shootings of Serb civilians and other revenge-motivated attacks. On Friday, German peace-keepers found that KLA troops had been beating and mistreating elderly Gypsies whom they suspected of collaborating with the Serbs. One of these captives was killed.

The peace agreement calls for the demilitarization of the KLA, which negotiators say is not quite the same as its disarming. Many KLA fighters, having enlisted just in the past few months to defend their homeland, presumably will now return to their civilian lives. Others may be recruited and trained for a U.N.-approved police force. But some way must be found to separate legitimate soldiers from those guilty of attacks against Serb civilians.

Also key to stemming vengeance will be a legitimate investigation of war crimes. Slobodan Milosevic and his top lieutenants have been indicted already by the U.N.-sponsored war crimes tribunal in The Hague. But the list of their alleged offenses will lengthen now that investigators have access to the scene of the crime. The list of indictees should lengthen, too. From Serb doctors who allowed critically ill patients to be carted out of hospitals in wheelbarrows to policemen who tortured civilians to higher-ranking officers who condoned executions, those who committed crimes against humanity should be named and held accountable. Many will have disappeared into Serbia proper, beyond arrest for now; it is important nonetheless to establish the record and let them know that they can never be truly at ease.

Russian military officials negotiated all week for a role in Kosovo equal to that of the NATO powers, but Russia is not entitled to such a role. Not because it is weaker, or because it did not participate in the air campaign, but because many of its officials continue to view NATO as villain and Mr. Milosevic as victim. That makes Russian troops of uncertain value in protecting Kosovars or arresting Serb war criminals. U.S. officials say they have worked out a way for Russia to contribute without discouraging the return of any Kosovars. That is to be welcomed; it is better to have Russia inside the tent, cooperating, than outside, sulking. But it is an arrangement that will have to be watched closely in practice.