Russia's latest conflict in the Caucasus, the fighting in Dagestan, seemed to come out of nowhere 19 days ago. Today, as Russian troops reassumed control of a half-dozen villages that had been occupied by Islamic rebels, it appeared to evaporate just as swiftly.

Russian artillery, helicopter gunships and bombers have largely destroyed the hamlets, which the rebels quietly abandoned over the weekend. But it is far from certain that the rebel forces took heavy casualties. Russian officials said hundreds of guerrillas fled to neighboring Chechnya and may be regrouping there for further attacks in Dagestan.

The inconclusive finale suggested to many here that the past three weeks may be no more than a prelude to a protracted struggle, of the kind all too familiar in this remote region of Russia. Fighting in the Caucasus is something of a Russian tradition. Starting with the region's conquest by Peter the Great, Russia fought wars there for 150 years. Czar after czar, and then Soviet commissars, used armed force and exile to try to subdue the rugged, largely Muslim population.

Now, a Russian state that is at its weakest point in decades will be vulnerable to successive revolts, Russian analysts predict. "There will be new fighting, don't worry," said Dmitri Trenin, a military analyst at the Carnegie Endowment for International Peace here. "It would take money and the ability to instill fear to keep the Caucasus quiet, and right now, Moscow is not capable of producing either."

One factor that will keep Dagestan--and the rest of the Caucasus--roiling is the unsettled state of Chechnya, which fought and won a war of secession against Russia and gained de facto independence in 1996. It is currently a devastated and impoverished land dominated by competing armed factions. Chechen commanders, apparently operating outside the control of any central authority, led the fighting in Dagestan with the avowed aim of creating a pan-Caucasus Islamic state.

To end violence in the Caucasus, some observers say, it will be necessary for Russia first to come to terms with Chechnya, whose independence Moscow does not accept. "If we want to remain in the Caucasus, we have to . . . end our war with Chechnya by recognizing that its people will never be citizens of Russia," wrote political columnist Andrei Piontkovsky.

The unsettled state of Dagestan's politics also means instability and a convenient target for Chechen insurgents. In Soviet times, Dagestani government jobs were divided among its many ethnic groups, as were government subsidies. But in recent years, aggressive clans have pushed less robust factions aside, excluding some from the shrinking trough of federal aid. Local leaders have set up private armies to provide security for illicit businesses--a mirror of the situation in Chechnya.

During the recent fighting, Russia armed some of these localized militias to bolster defenses against the rebels. But critics said the move may prove to have been a mistake because it serves to legitimize armed groups not controlled by the government, and the factions are bound to turn against each other. "Thousands of Dagestani volunteers clamoring for weapons may soon turn out to be a real pain in the neck for federal authorities," wrote the newspaper Izvestia.

Militarily, it was as if two conflicts were fought during these past 19 days. After several advances on rebel-held mountain hamlets were repelled, the Russian army and police changed tactics. They began to rely on air power rather than infantry and tanks in order to hold down casualties, Russian officials said.

The guerrillas, too, reassessed their tactics once it became apparent that the Russians would not invade, but attack from the air. The insurgents' initial aim, Chechen officials said, was to take the town of Botlikh, where the convergence of three canyons form a gateway to Dagestan. But Botlikh never fell.

Chechen guerrilla leader Shamil Basayev implicitly acknowledged an error when he said a few days ago that in the future, the guerrillas will be mobile. Today, rebel spokesman Magomed Tagayev explained that the guerrillas "chose completely different tactics in order to rule out being targeted by massive bombing.

"They will be everywhere and nowhere. Military tools will give way to military and political tools."

To Russian observers, this means hit-and-run raids and exploitation of the rivalries among Dagestan's 30 ethnic groups.

On the issue of casualties, each side produced final numbers today. The Chechen spokesman said 38 guerrillas died: 13 Chechens, 16 Dagestanis, three Turks, five Arabs and one fighter from the Caucasus area of Ingushetia.

The Russians said 47 soldiers and 12 policemen were killed, including eight officers.

CAPTION: A Russian soldier directs artillery fire on rebels Tuesday in the Botlikh region of Dagestan. Russian troops have taken possession of villages that had been captured by the rebels who infiltrated the region from neighboring Chechnya.