GROZNY, Russia (AP) _ Chechen gunmen who attacked a town and held frustrated troops at bay for a week escaped into the mountains Tuesday, freeing their last hostages after winning safe passage out of a besieged hospital and across the rugged terrain of southern Russia.

In Moscow, a wave of criticism crashed down on Boris Yeltsin for his handling of the hostage crisis, including his authorization of two bloody raids on the hospital and government concessions to the hostage-takers.

Several parliamentary leaders warned their parties would cast votes of no confidence in the government in a Wednesday vote.

An estimated 126 people who had accompanied the Chechens as human shields on a 30-hour bus ride along country roads were on their way home Tuesday night.

The Chechen commander, Shamil Basayev, was greeted as a hero by Chechen villagers standing along the roads, lifting up their children to watch the buses and shouting ``Allah Akbar!'' (God is Great), according to a reporter for Russian Television who was among the hostages.

Interior Ministry officials said troops had shadowed the gunmen and would try to prevent their escape. There were no immediate reports of any action after the hostage release.

The Chechen gunmen raided Budyonnovsk, a small city about 90 miles north of the separatist region, last week and held about 2,000 people hostage in a hospital to demand an end to the war in their separatist republic.

About 100 people were killed in the June 14 raid, and dozens more died when Russian troops unsuccessfully stormed the hospital on Saturday.

The gunmen released more than 400 hostages over the weekend and agreed in negotiations with Prime Minister Viktor Chernomyrdin to release most of the rest on Monday. In return, Chernomyrdin guaranteed the Chechens safe passage to Chechnya, and called for a halt to military operations in the republic and resumption of peace talks.

Basayev had asked for the volunteer hostages, who included local officials, journalists, lawmakers, doctors, nurses and others.

The last hostages were released at dusk Tuesday in the village of Zandak, near Vedeno, a town in the rebel-controlled southern mountains. Then, according to the Interfax news agency, the rebels drove two of the buses and a refrigerator truck carrying the bodies of rebels killed in the Budyonnovsk standoff to another village, Dargo, near Vedeno.

Vedeno, Basayev's home town, was recently taken by Russian troops, but Chechen guerrillas continue to wage war from the mountains around it.

The hostages freed Tuesday night returned on five buses to the nearby republic of Dagestan. The rebels released 123 hostages, according to the NTV television network, which said three journalists decided to stay with the gunmen to report.

Many hostages hadn't eaten in days, and were immediately given dinner, Russian Television reported.

The buses left Monday afternoon from Budyonnovsk and headed for Chechnya along winding steppe backroads. The buses spent much of Tuesday just over the border in Dagestan while the Chechens sought additional safety guarantees from the government.

ITAR-Tass said the Russian government provided the guarantees, but Moscow would not confirm the report.

In past hostage incidents, Russian authorities have capitulated to terrorists' demands only to attack them later.

Basayev was quoted Tuesday by the Interfax news agency as saying he wanted ``the earliest release of all the remaining hostages and an end to this tragedy, taking into account the serious condition of the injured (fighters) and the extreme fatigue of the hostages.''

He apologized to the hostages before releasing them, Russian Television said.

As part of the deal to win the hostages' release, the Russian military declared a cease-fire Sunday night in Chechnya, but continued clashes were reported.

The peace talks began Monday in Grozny, the Chechen capital, and resumed Tuesday between a high-level Russian delegation and representatives of Chechen leader Dzhokhar Dudayev. The sides agreed to a three-day cease-fire starting Wednesday, Russian news agencies reported.

``The end of the war has begun,'' said Usman Imayev, who represented Dudayev.

But the sides appeared far apart on some points, including Dudayev's role in any future government. Some Grozny residents in the crowd outside the talks were skeptical.

``They might agree something today, but as soon as the hostages are freed, they'll start killing us again,'' said Ali Sarimsultanov, 30.

In Moscow, President Yeltsin, who has come under heavy criticism throughout the hostage crisis, met in the Kremlin with Chernomyrdin.

``I see no mistakes on his part,'' Yeltsin told reporters, according to news agencies. He said he was in contact with the prime minister ``if not each half-hour, then every hour.''

The government faces a vote in parliament Wednesday over its handling of the crisis, and the leaders of several major parties have said their blocs will cast votes of no confidence.

One Communist lawmaker began collecting deputies' signatures on a motion to impeach Yeltsin.

The rebels' bus convoy was sent on a long, circuitous route to Chechnya. It was stopped by troops at the border of North Ossetia, which borders Chechnya, and sent through Dagestan instead.

A crowd of 13,000 mainly sympathetic residents of the town of Khasavyurt, in Dagestan near the Chechen border, surrounded the red-and-white buses as they waited, Interfax said, quoting the Federal Security Service. Russian armored vehicles also stood by, and military helicopters flew overhead, ITAR-Tass reported.

The people of Khasavyurt were among those who tried to stop Russian tanks advancing into Chechnya in December.

The war in Chechnya, which Dudayev declared independent in late 1991, has killed thousands.