Half a century ago, Mahatma Gandhi tried to erase what he considered "the greatest of all blots" from India's largely Hindu society by espousing the cause of the untouchables, whom he renamed harijans, or children of God.

The name stuck. But India's 100 million untouchables remained outcastes, still doomed to the lowest rungs of the economic ladder in one of the world's poorest countries and living in constant fear of attack by other Hindus, usually those just slightly better off than themselves.

Within the Hindu social system, untouchables are literally outcastes. They belong to none of the 3,000 castes and subcastes that define other Hindus' status and role in life.

India ended 1981 with its second massacre of untouchables in six weeks, causing Prime Minister Indira Gandhi to plead for greater security for harijans and threatening the rule of her chief minister in India's most populous state of Uttar Pradesh, where both recent attacks on harijans occurred.

In the latest attack, four or five armed men at dusk Wednesday entered the village of Sadhofur, about 15 miles north of the tourist center of Agra, where the Taj Mahal is located, and started shooting at harijans. In 15 minutes, they killed 10 persons--including five women and two children--and severely wounded two others.

"They killed the harijans like rabbits," wrote Niraj Roy in the Indian Express.

The killings in Sadhofur followed by exactly six weeks the Nov. 18 unprovoked daylight slaying of 24 untouchables, including seven women, in the village of Deoli, 18 miles to the north.

It remains unclear what caused the raids on the untouchables, although they are believed to be related to some effort by low-caste Hindus to keep the harijans in their place.

While these mass killings are an extreme manifestation of anti-harijan activities, attacks on untouchables in modern India are increasing rather than subsiding, according to figures compiled by Shishir Kumar, the government's commissioner for scheduled castes and tribes.

His latest report, released last March, said the number of "atrocities" against untouchables has tripled in the three years beginning in 1976, and are continuing to climb in 1979.

That year, the last for which any figures were available, he reported more than 15,000 attacks on untouchables, with about one-third of them in Uttar Pradesh.

An editorial in the Times of India after the Deoli massacre said attacks on untouchables are increasing because the the harijans have become "more assertive and organized than they have ever been in their long and wretched history.

"That they should have the gall to question their lowly status and even seek to raise it is more than the hidebound upper classes can bear," the editorial continued.

Indian sociologists have noted that most of the attacks on untouchables come either from small landowners, who fear that their economic security will be threatened if the largely landless harijans assert their rights to such things as minimum wages, or from low-caste Hindu laborers.

"The assertion of their rights has caused active hostility among the vested interests in the rural areas," Commissioner Kumar reported.

Frequently, local authorities and police are allied with these "vested interests," which led Home Minister Zail Singh to agree in Parliament that untouchables should be armed for self-defense.

He recanted on that pledge soon after making it. But Vishwanath Singh, Gandhi's chief minister for Uttar Pradesh, promised to resign if the perpetrators of the Deoli massacre remained free. He later said enough arrests had been made so he could keep his job, but so far he has made no similar promise as a result of the Sarhupur killings.

The two mass killings of untouchables in his state pose political problems for the Gandhi government. Gandhi toppled the Janata Party government in that state almost two years ago because police ran amok, attacking untouchables, in the village of Narainpur. This, she said, was evidence that the state government was unable to maintain law and order.

The position of untouchables in the complex Hindu social hierarchy, with its 3,000 castes and subcastes, came to the forefront earlier this year with the report that 2,000 harijans in the southern Indian state of Tamil Nadu had converted to Islam. These included half the residents of a village of 1,300 called Meenakshipuram.

While some politicians charged that an influx of money from the oil-rich Islamic states of the Persian Gulf had bought the loyalty of the untouchables--and possibly mounted a psychological attack on India by diluting the hold of its more than 80 percent Hindu majority on the nation--most independent observers believe the harijans converted because they were tired of their lot in life.

K.A. Arumugam, regional director of scheduled castes and tribes, for instance, cited long years of harassment and humiliation that led them to convert.

"We are not allowed to carry our towels on our shoulders. We can't take water from a common well. We can't sit on a bench where a caste Hindu is sitting," said one former untouchable who converted to Islam.

"But Moslems treat us equally," he added.

Moreover, they feel protected by India's Islamic population, a somewhat unusual phenomenon, since the Moslems, too, are subjected to violent attacks by Hindus, including untouchables. Nonetheless, said Gandhi's minister of state for home affairs Yogendra Makwana, "after conversion they feel protected and safe."

This is not the first time large numbers of untouchables have converted from Hinduism to another religion, largely Christianity during the days of the British raj, although in 1956, half a million harijans publicly changed to Buddhism.

The Tamil Nadu conversions, however, became a major issue in Parliament this summer and galvanized Hindu political and religious leaders into action.

Holy men who once preached that a caste Hindu became impure if so much as an untouchable's shadow fell on him now shared food and water with harijans. One politician, a devout Hindu, organized a rally of half a million people representing all 60 Hindi sects to support the abolition of untouchability.

The politician argued on the basis of his vast Vedic knowledge that untouchability was not a part of Hinduism, but rather a social phenomenon that could be done away with.

It is, however, one that has been rooted in Hinduism for 3,000 years and so far has resisted efforts by independent India to end it.

The country, for instance, runs what many call "the world's largest affirmative action program" in an attempt to make sure the untouchables are able to climb the economic ladder by being ensured seats in universities and jobs in government.

Instead, however, these efforts have led to increased bitterness between untouchables and caste Hindus who say there is reverse discrimination.

Furthermore, the strong family ties within Indian society have meant that spots reserved for untouchables have not been spread throughout the community but often are kept within family groups.

As a result, while a few harijans have prospered, the vast majority remain among the poorest of the poor.