Two of the last surviving titans of India's independence struggle -- both disciples of Mahatma Gandhi -- lay near death today, one in detention imposed by Pakistani martial-law authorities and the other on a fast that he has refused to break even at the behest of Prime Minister Indira Gandhi.

Khan Abdul Ghaffar Khan, 94, whose political dominance in the North-West Frontier Province of what is now Pakistan earned him the title of "the frontier Gandhi," is reported in critical condition in a Peshawar hospital where he is technically under house arrest for participating in banned political activities.

Reports from Peshawar said that Ghaffar Khan, a close associate of Jawaharlal Nehru and Mahatma Gandhi who first fought the British and then the Pakistanis -- and was imprisoned by both for more than 30 years -- was moved to the hospital from a rest home after his condition began to deteriorate.

Nearly 800 miles away, in his ashram in the central Indian town of Paunar, Acharya Vinoba Bhave, 87, who in 1920 was chosen by the mahatma to be his first advocate in the individual noncooperation movement against British rule, is conducting an avowed fast until death, apparently for ascetic reasons.

The acharya, or holy teacher, who became famous in the 1950s when he walked barefoot thousands of miles throughout India to launch a land redistribution movement and more recently has led a perennial campaign against cow slaughter, has refused treatment and medication following a heart attack and is refusing to take any nourishment.

Gandhi flew to Paunar last week, where she unsuccessfully appealed to Bhave to break his fast after doctors warned that he faces kidney failure and death.

Chemical and Fertilizer Minister Vasant Sathe, who accompanied the prime minister, said Bhave had decided to take samadhi, which in Hindi means assuming a yoga posture in which breathing is stopped, but which figuratively means suicide.

Gandhi told reporters she had asked Bhave to take food and he had refused. His physicians said today that his blood pressure was dropping and that he was "communicating with God."

Ghaffar Khan and Bhave -- each in his own way -- have approached the end of their lives expressing disillusionment and disappointment in their failure to realize the Gandhian dream of a new social order through revolution by consent.

On frequent occasions, Ghaffar Khan complained that the purpose for which India struggled for independence had not been achieved, and that Indian leaders had become consumed with "lust for money and power."

The champion of Hindu-Moslem brotherhood, who opposed the concept of partition of the British-ruled Subcontinent into India and Pakistan, often said he was not impressed by the technological and industrial advances of India because its benefits reached only a small proportion of the people.

Ghaffar Khan also was embittered about martial-law rule in Pakistan, spending three years in self-imposed exile in Afghanistan before his return last April.

"What the British did I understand, but I don't understand why I was made to suffer in Pakistan. Whenever I am here, either I am put in jail or placed under house arrest," Ghaffar Khan said in an interview earlier this year in the Islamabad daily, The Muslim. He has spent 15 of the last 35 years in prison.

An imposing, craggy-faced figure of 6 feet, 4 inches, Ghaffar Khan began his fight against the British in 1920, demanding for the frontier Pathan tribesmen the same reforms the colonists had instituted elsewhere in their Indian empire.

He formed a resistance group called the Red Shirts -- their clothing was dyed with brick dust -- which led a revolt in Peshawar. Ghaffar Khan was jailed and the city was bombed by the Royal Air Force, but in 1932 the frontier was given the same administrative status as the rest of India.

At the time of partition he fought for an autonomous state for the Pathans, and until his hospitalization on Nov. 4 continued to be a thorn in the side of the government of Gen. Mohammed Zia ul-Haq.

Acharya Vinoba Bhave's relentless campaign for a ban on all cow slaughter -- a controversial issue in a country where large minorities of Moslems and Christians eat beef -- has never been completely fulfilled.

A ban is written in the Constitution, but it was left to individual states to pass the appropriate legislation, and two of them -- Kerala and West Bengal -- permit cow slaughter.

India has an estimated 300 million cattle and the issue is not a minor one for Hindus, who revere the cow as a mystical mother figure. At the same time, secularists argue that millions of cows roaming in cities and countryside are threatening the ecological balance.