When an Indian court found Prime Ministry Indira Gandhi guilty of election malpractice 20 months ago, a number of members of her Congress Party looked to Agriculture Minister Jagjivan Ram to take over leadership of the party and the nation.

But Ram. who announced yesterday that he is quiting the government to lead a new opposition party, had made the decision then not to act swiftly.

Instead, he told me at his sprawling, colonial-style bungalow on New Delhi's tree-shaded Hastings Road, he would wait for the Supreme Court to reach a judgment on the initial verdict. "If the Supreme Court goes against her, then the party should choose a successor who commands the majority," he said. Ram. it was clear, considered himself that person.

Yet, conditioned by 35 years of party discipline, Ram. 68, took a public stance in support of his besieged leader. In an emotional party meeting on June 18, 1975, Ram introduced an important resolution. "This meeting reiterates its fullest faith and confidence in her and firmly believes that her continued leadership is indispensable for the nation," Ram said.

Fourdays later, he told a caller that "many party members were advising the lady to stick it out, not to resign, out of their own self-interest." How he reconcited this criticism with his own performance was not made clear and this gap is sure to haunt him in the weeks ahead.

Judging from his surprise announcement yesterday to oppose Gandhi, he may have been disappointed with himself all these months.

As the only "harijan" or untouchable, in a succession of Cabinet posts, he was widely accused of using this power base of millions for his won gain while ignoring the plight of his down-trodden people.

It was widely known that he had never paid taxes on his substantial income, earned from a variety of sources. He was, however, universally acknowledged at a tough and able administrator. When India was in the depths of a food crisis in late 1974, Ram was shifted from his post as defense minister to the Agriculture Ministry.

Although Gandhi's emergency measures and a series of beneficient monsoons have been credited with an extraordinary improvement in the national food picture, Ram must share in the credit.

Ram "doesn't take no for an answer," an Agriculture Ministry official said a few months after Ram took charge. "He's knocking heads together and rapping knuckles all the time. If it's possible to build a food surplus, he will get it done."

Most of all, Ram has been a survivor. Ministers and confidents came and went, but Ram was constantly in the Cabinet, beginning with the interim government in 1946, the year before India won full independence from Britain, until yesterday.

Ram declared that he and two other senior Congress Party members were leaving to protest Gandhi's "despotic rule." It is likely that Ram left also because his power was being eroded, mainly by Gandhi's son, Sanjay.

Although Sanjay has no ggovernment role, he has become a dominant figure in the party and the nation since June 27, 1975, when his mother stunned the nation with an early morning radio broadcast announcing the state of emergency and widespread arrests of her political opponents.

A few hours after the broadcast, Ram told two journalists that neither he nor any Cabinet members had been consulted by the prime minister. The decision and the initial list of those to be arrested, he said, was drawn up by Indira and Sanjay Gandhi and the chief minister of West Bengal, Siddartha Shankar Ray, then a close friend of the Gandhi family.

As a party insider since the days when Gandhi was a child at the knee of her late father, Prime Minister Jawaharlal Nehru, Ram was at once irate and despondent at being left out. Although he did not say it, his face showed that he was instinctively saddened by the elimination of parliamentary democracy - a cause for which he fought alongside Nehru and others.

Ram's demeanor is caricatured by Indians derisively as "Congress wallah," a professional politician who has grown fat and rich at the expense of his constituents. But Ram's constitutents, the millions of outcasts who occupy the lowest rung of India's social ladder, still look to him for leadership and representation in government.

Ram has never forgotten his origins. Born in 1908, in what is still perhaps the most deprived of India's states, Bihar, Ram began his political career by launching the Bihari agricultural labor movement.

While Ram's efforts on behalf of his people have since slipped into occasional speech-making, he's still about the best hope the untouchables have. Thus, the important untouchable vote, so long and overwhelmingly committed to the Congress Party, will be up for grabs for the first time in India's history.