Heavily armed guerrillas from Chechnya assaulted Russian and local installations in a neighboring region Tuesday, touching off fighting that killed at least 57 people in the deadliest incursion outside Chechen borders in five years.

Between 100 and 200 fighters opened fire with assault rifles and rocket-propelled grenades on targets in three towns in Ingushetia in orchestrated overnight attacks before vanishing as quickly as they had appeared. Among the dead were the region's acting interior minister, killed in his car as he sped to his headquarters, two prosecutors and a U.N. aid worker.

President Vladimir Putin flew to Ingushetia to inspect the scarred region and ordered in a military detachment to restore order and help hunt down the attackers. "They need to be found and wiped out," the president said in televised remarks at the Kremlin before he left, "and those who can be caught must be caught alive and brought to trial."

The attacks are another challenge to Putin's efforts to treat the decade-old Chechen conflict as largely finished and reestablish stability in the region. Overpowered on the conventional battlefield, Chechen rebels have increasingly turned to suicide bombings in southern Russia and Moscow, as well. Last month, Chechen President Akhmad Kadyrov, a Kremlin ally, was assassinated in a bombing during a parade at a soccer stadium in the capital, Grozny.

Now, for the first time in 20 months, local resistance forces have demonstrated that they can marshal a relatively large-scale attack and in Ingushetia they have chosen a relatively new combat zone. The war has gradually been slipping over into Ingushetia in the form of guerrilla attacks, random airstrikes, abductions and a failed assassination attempt against the region elected leader in April.

Russian officials tied Tuesday's attacks to Islamic extremism elsewhere in the world. "What it shows is that terrorist acts staged in various countries and regions have a logical connection between them," Putin's national security adviser, Igor Ivanov, said in an interview at the Kremlin. "Their goal is to destabilize the situation, to provoke the authorities to take certain steps that could later be used to justify their actions."

Local residents emerging from basements where they had hidden during a night of gunfire and explosions expressed fear that the war had now unmistakably arrived.

"The situation in Ingushetia was getting dramatically worse in the last several weeks," Yekaterina Sokirianskaya, an activist with the Moscow-based human rights group Memorial, said by telephone from Nazran, the main city in Ingushetia. "But nobody expected such an attack. People are afraid. It's obvious that the war has spilled over to Ingushetia already."

"It's going to be the same as in Chechnya," said Arsen Sakalov, the Ingushetia coordinator of another human rights group, the Chechen Justice Initiative. "This was the first step. The terrorists were testing the waters."

The incursion was reminiscent of a thrust by Chechen guerrillas into neighboring Dagestan in August 1999. That provoked Russian authorities to launch their second Chechen offensive in a decade and fueled Putin's rise to the office of prime minister and later the presidency. But this time, the attackers focused on striking law enforcement targets rather than seizing territory.

The attacks began at about 10:45 p.m. Monday in Nazran, as well as the villages of Karabulak and Sleptsovskaya, and continued past 3 a.m. Tuesday, according to officials and residents.

"We at first thought it was fireworks," Sokirianskaya said. "We thought it was someone's wedding or something. Then it got louder and louder and everyone got scared and turned their lights off. The air was thick with the smell of gunpowder."

The guerrillas seized several checkpoints and, impersonating police officers, began stopping cars. When one high-ranking prosecutor arrived at a checkpoint, the guerrillas demanded to know who he was, according to several accounts from the region. When he produced identification, the guerrillas shot him dead.

The acting head of the region's Interior Ministry, Abukhar Kostoyev, and his deputy were also shot in their cars as they drove to ministry headquarters after the attack, officials said.

"These people were not freedom fighters," declared Alexei Baigushkin, spokesman for the local branch of the Federal Security Service, Russia's domestic intelligence agency. "They're regular bandits." The bodies of five slain officers from the service were mutilated, he said. The attackers "killed without any pity."

Baigushkin said in an interview that some guerrillas had disguised themselves as federal troops and conducted their own zachistka, or cleansing operation, in an Ingush village, imitating Russian troops who take away civilians, often to be tortured or killed. Instead of civilians, though, Baigushkin said the guerrillas went door to door checking documents and took away anyone connected to a law enforcement agency. Others raided an armory and drove away with three trucks loaded with weapons.

While guerrillas reportedly managed to seize part of the Interior Ministry building in Nazran, officials said 15 ministry troops fought them for six hours and prevented them from opening jail cells before the assailants retreated.

By early morning, a long column of armored vehicles and troop trucks was streaming into Ingushetia. Putin later ordered a new regiment of Interior Ministry troops to take up positions in Nazran and criticized subordinates. "Judging by everything that is going on here," he said after arriving, "the federal center is not doing enough to defend the republic."

According to authorities, 47 of the dead were police officers, prosecutors or other security agents. Just two attackers were reported killed. The rest of the dead were civilians. At least 60 other people were injured, officials said. After fighting subsided Tuesday morning, bodies and burned-out armored personnel carriers and cars were left in the streets.

The guerrillas included Chechens, Ingush and Russians, officials said; some asserted that a few Arab fighters also participated. Chechen commander Aslan Maskhadov recently warned that rebels would mount new operations, but his deputy, Akhmed Zakayev, told a Russian radio station that Maskhadov was not behind the latest attacks. Russian officials said they suspected guerrilla commander Shamil Basayev of orchestrating the operation, as he did the 1999 thrust into Dagestan.

A man cries near a burned-out jeep in Nazran, Ingushetia's main city, after guerrilla attacks killed dozens of police officers and other security agents. Flanked by bodyguards, Russian President Vladimir Putin, left, visits Nazran after the attacks. He ordered a regiment of Interior Ministry troops into the region to restore order and help hunt for the attackers.