The 155 hostages aboard an Indian Airlines plane walked to safety here today after the Indian government delivered three jailed Islamic insurgents to hijackers who had seized the plane, bringing an eight-day ordeal to a dramatic and peaceful end.

The hijackers surrendered to officials of Afghanistan's ruling Taliban militia and were taken off the plane into government custody, still armed and wearing ski masks, and were given 10 hours to leave the country. One unarmed Taliban official accompanied them as a hostage to guarantee their safety as they and the freed insurgents were driven to various consulates in Kandahar to seek asylum.

Foreign diplomats escorted all the hostages off the stranded jet 15 minutes after the three former prisoners were turned over to the hijackers. The passengers--described by diplomats as being in generally good condition--were driven to two waiting aircraft and flown immediately to New Delhi. Upon their arrival, some looked weary, but others grinned as they wobbled down the steps of the planes.

Although it is believed that five hijackers were involved when the Airbus A300 was seized last Friday while en route from Katmandu, Nepal, to New Delhi, only four hijackers emerged from the aircraft in southern Afghanistan today. Diplomats said they saw the body of a man on the plane and suggested that the hijackers had killed one of their colleagues. The hijackers fatally stabbed one passenger during the first hours of the hijacking, but his body was removed from the aircraft during an earlier stop in the United Arab Emirates.

The hijackers, who have not been conclusively identified, were said to include several Pakistanis and one Afghan. They claimed to be supporters of an armed movement that has been fighting for 10 years to end Indian rule in Kashmir, a Muslim-majority region divided between India and Pakistan and claimed by both countries.

The three prisoners released by India were identified as Maulana Masood Azhar, an Islamic cleric from Pakistan, who is a top leader of the Kashmiri rebel group Harkat ul-Mujaheddin; a British citizen named Omar Sheikh; and an Indian Kashmiri named Mushtaq Zargat. The hijackers initially demanded only Azhar's release, then upped their demands to 36 prisoners and $200 million in ransom. They finally dropped the ransom demand and settled for Azhar and the two other prisoners.

It was far from clear tonight what would happen to the hijackers and the three released prisoners. Afghanistan has said it will not grant them political asylum, and Pakistan also has said it will not accept them. Only three countries--Pakistan, Saudi Arabia and the United Arab Emirates--have diplomatic relations with the Taliban, a radically conservative Islamic movement that controls most of Afghanistan.

"It was agreed that the hijackers will be allowed to go into [Kandahar] and talk to consulates and see if they are in a position to give them shelter," Taliban Foreign Minister Wakil Ahmad Muttawakil told reporters tonight. "If they are not given shelter, they must leave Afghanistan by any means and release the hostage. It was made clear during the negotiations that they will not be given asylum here."

[Early Saturday, Taliban spokesman Rehnatullah Aga said the hijackers had crossed the border, the Associated Press reported. But he did not say where they went.]

Both Muttawakil and his Indian counterpart expressed relief at the outcome, which was a feat of emergency diplomatic partnership between two governments whose relations have generally been adversarial. India, a largely Hindu country, does not officially recognize the Taliban.

"We are more than happy that the authorities of the Islamic emirate of Afghanistan were able to tackle this humanitarian crisis and release the hostages on board," Muttawakil said. "We are happy that the passengers, crew and aircraft were safely handed over to the government of India."

Indian Foreign Minister Jaswant Singh, who turned the released prisoners over to Taliban officials, spoke briefly at Muttawakil's side at the airport before returning to New Delhi with the passengers, who included more than 100 Indian citizens and one American woman. Singh expressed India's "gratitude and indebtedness" to Muttawakil and the Taliban regime, especially "to his excellence personally," for their "support and cooperation" in ending the crisis peacefully.

Muttawakil repeatedly praised Singh and said he hopes India will respect the "historic service" his government had performed in the crisis. But he denied that his government, shunned around the world for allegedly abusing human rights and sponsoring terrorism, was now hoping to be recognized by India and other countries.

"This has nothing to do with political recognition," he told reporters. "It depends on India, what they think or say. What we did was not for recognition or anything else. It was just for a humanitarian cause."

Despite the bilateral cordiality, the Indian government is expected to face domestic criticism for giving in to some of the hijackers' demands and releasing the jailed insurgents. The Indian hostages' families had strongly pressured the government to end the crisis, even if that meant turning over some prisoners.

"From the beginning, our primary concern was to deter the hijackers and safely return all passengers and crew," Singh said tonight. "India fights against such criminal actions that are inhuman beyond description, and that fight shall continue."

The peaceful solution ended days of mounting tension, during which the hijackers reportedly threatened to start shooting passengers if their demands were not met. On Thursday, the Taliban sent heavy weapons and commando forces to surround the plane, and Taliban authorities threatened to storm the aircraft if any passengers were harmed.

"The real credit goes to intelligence, to those who used their brains in the proper way and context, especially the Taliban," said Erick de Mul, the chief U.N. representative in Afghanistan, who had been assisting during the crisis. "This was an incredible headache for them, but they played a very important role and made it absolutely clear they would go into action if anything happened to the passengers."

The hostages were not allowed to speak to journalists in Afghanistan, but diplomats who boarded the plane described them as being in good condition considering their prolonged ordeal. Several ailing passengers were allowed to receive treatment by Indian and Afghan physicians during their captivity.

"It was a terrible relief for them; one Belgian man collapsed in the arms of the Belgian consul and cried," said Hans Stalver, a Swiss diplomat. "I think he had been badly treated and traumatized, blindfolded with a gun put in his mouth." But Stalver said most of the passengers seemed "in good physical and emotional condition."

The single American passenger was identified by diplomats as Jeanne Moore and described as a woman in her fifties. They said she seemed disoriented but in good spirits as she left the plane, and that she even took some parting snapshots. Moore is a special education teacher from Bakersfield, Calif., and was on a private trip to India, the Associated Press reported. The U.S. government had not acknowledged until today that there was an American aboard, and no U.S. diplomats accompanied the diplomatic delegation to the plane.

"I held up my badge and told her I had promised to look after her," said Stalver, who is posted to the Swiss Embassy in Islamabad, the Pakistani capital. He flew here to escort two Swiss passengers off the plane. The American woman was "completely hidden under a veil, which the hijackers had demanded" he said. "I told her she was safe."

The three days of negotiations involving Taliban and Indian officials and the hijackers were conducted in secrecy, and Indian authorities denied until Thursday that a deal was in the works. But Muttawakil, who described the process in detail tonight, said that the "core issue" of exchanging the hostages for some prisoners was resolved by Thursday and that the only remaining issue had been what to do with the hijackers afterward.

"That problem took a lot of time," he said. "Where would they go, and who would give them asylum." Muttawakil said the Taliban asked the International Committee of the Red Cross to take the hijackers to Indian Kashmir, but the Red Cross refused to comply without an agreement from India, Pakistan and Afghanistan. He also said Pakistan was approached but refused to accept the hijackers.

The role of the Taliban officials was crucial in persuading the hijackers to surrender, and their influence was clearly enhanced by their close relationship and religious affiliation with regional Islamic movements. Azhar's insurgent group has trained its members in Afghanistan, and many Afghans have participated in the Kashmir rebellion.

A WEEK OF TERROR

Day 1: Plane is refused permission to land at Lahore. During refueling in Amritsar, the five hijackers say they have killed one hostage, an Indian.

Day 2: During stopover in the United Arab Emirates, the hijackers release 27 passengers, mostly women and children, and the body of the Indian passenger. They make public their demands: Release of Pakistani Muslim Leader Maulana Masood Azhar and several other militants imprisoned in India for inciting separatism in Kashmir.

Day 3: U.S. official Erick de Mul, based in Pakistan, flies to Kandahar and visits passengers aboard plane; he reports them to be safe. Hijackers release a diabetic passenger.

Day 4: Hijackers threaten to kill hostages if their demands are not met; Indian officials arrive in Kandahar and begin talks with Taliban leaders and hijackers.

Day 5: Indian negotiators say hijackers have added demands, including release of 35 militants, a cash payment of $200 million and return of a slain militant's body.

Day 6: Indian negotiators say the hijackers have dropped their demand for cash and return of the militant's body.

Day 7: Hijackers allow a hostage suffering from cancer to leave the plane for treatment; he is then returned to the plane.

Day 8: India releases Azhar and two other militants and flies them to Kandahar. The hijackers drive off in four-wheel-drive vehicles, taking with them the freed militants and one Taliban soldier as a hostage. Taliban leaders say the hijackers have 10 hours to get out of the country; the convoy is followed by a group of armed Taliban soldiers. Indian plane flies freed hostages to New Delhi.

CAPTION: Day 1: Indian Airlines Flight 814 departs for New Delhi on Dec. 24 but is hijacked upon entering Indian airspace.

CAPTION: Day 2. Plane stops over at air base near Dubai on Dec. 25.

CAPTION: Later Day 2: Plane flies to Kandahar, where it sits on the tarmac with the hostages aboard until Dec. 31.

CAPTION: Devi Sharan Sharma, the pilot of the hijacked jet, is mobbed by well-wishers after he and the other freed hostages were flown to New Delhi airport.

CAPTION: Taliban militiamen carrying rocket launchers and other weapons run to follow a van carrying the hijackers and the three Islamic insurgents freed by India as they leave the airport for central Kandahar to seek asylum in a foreign country.