In a solemn ceremony under tight security early this month, Indonesia's President Suharto led senior military officers, Cabinet ministers, members of the diplomatic corps and several hundred students to an old well known as the "crocodile hole" near Jakarta's Halim Airport. There, on Sept. 30, 1965, the bodies of six leading generals and a colonel were stuffed down the well after they had been kidnaped and murdered during an abortive coup attempt by the Communist Party.

As Suharto and his entourage toured an imposing monument that now marks the old well, a gaunt, gray-haired man in a courtroom in central Jakarta was ordered by the presiding judge to bow his head for a few moments of silence. The man, Hartono Rekso Dharsono, 60, was once a lieutenant general and a pillar of the president's early days in power. Now he is being tried on subversion charges for allegedly inciting Moslems to rebel against the government. The charges carry a maximum penalty of death by firing squad.

Twenty years after Suharto, then a little-known Army general, crushed the coup attempt and launched his own bid for power, his government is cracking down on leading dissidents who were once his comrades in arms. They include former top generals and Cabinet ministers who were instrumental in building Suharto's "new order" to replace the leftist regime of Indonesia's first president, Sukarno.

The crackdown comes at a time of economic downturn that some government and military officials feel could be exploited by Moslem radicals.

Favorite targets of fiery sermons by militant Moslem preachers in recent months have been domination of the economy by the Chinese minority, the military's role in politics and the allegedly "un-Islamic" nature of Suharto's state ideology, known as pancasila, whose vaguely defined provisions are belief in one God, humanitarianism, national unity, representative democracy "guided by wisdom" and social justice for all.

Indonesia, a former Dutch colony that includes about 13,600 islands spanning 3,000 miles, ranks as the world's fifth most populous nation and the largest in the Moslem world. About 90 percent of its 160 million people are Moslems, although the faith is sometimes diluted by animist and other beliefs.

One of the founding members of the Nonaligned Movement, Indonesia now is considered a major prowestern force in the Third World and a regional bulwark against communism. The country also belongs to the noncommunist Association of Southeast Asian Nations (ASEAN) and the Organization of Petroleum Exporting Countries.

While the number of Islamic militants is believed to be relatively small, Indonesian and foreign sources say, the virtual political monopoly of Suharto's ruling Golkar party and the crackdown on dissidents mean that Islam is becoming the only forum for dissent.

"The power of political Islam in a formal sense has been broken" by requirements that all parties embrace pancasila and have their candidates for office approved by the military, a western diplomat said. Yet the religion "seems to be the one area of society that has the potential to throw up popular leaders and generate immense popular sentiment very quickly," he said.

Among those caught in the current crackdown are Moslem preachers accused of inciting antigovernment rioting and other violence.

In addition, four Communists arrested nearly two decades ago in connection with the failed coup attempt have been executed in recent months. The government says a lengthy appeals process caused the delay in carrying out the sentences, but critics suggest that some action against the left was seen as necessary to balance the crackdown on the Moslem right.

Moderate dissidents have charged that Suharto has stressed development at the expense of democracy and that the military's "dual function" role in government has created a totalitarian atmosphere.

The ultimate target of the campaign against dissidents, some of them feel, is a group of 50 prominent retired military officers, former Cabinet ministers, Moslem leaders and student activists who signed a 1980 "statement of concern" about Suharto's policies.

The statement charged that Suharto was turning the five-point pancasila state ideology into "an instrument of coercion against political contenders" and using the military as a partisan force for those in power.

Signers long have complained of government harassment. They say they have not been allowed to travel abroad, get bank loans or attend official functions.

But the pressure increased sharply last year after a violent incident in Jakarta's Tanjung Priok waterfront slum in which soldiers opened fire on angry Moslem marchers demanding the release of four arrested youths. The government has acknowledged that at least 30 persons were killed, but dissidents say the number may be greater than 100.

In the six months following the Sept. 12, 1984, shooting, a wave of bombings and fires rocked Jakarta and other cities on the densely populated island of Java.

Among the targets were a bank owned by a close ethnic Chinese associate of Suharto, a major Jakarta department store, a Catholic seminary in East Java, the renowned Buddhist temple of Borobudur and a tourist bus en route to the island of Bali. At least nine persons were killed in these incidents.

A few days after the Tanjung Priok shooting, 22 dissidents, including 16 signers of the Petition of 50, issued a white paper challenging the government's version of the incident and calling for an independent fact-finding commission to investigate it. The white paper blamed the unrest that led to the incident on the government's "deviations" from the 1945 constitution and the pancasila ideology spelled out in its preamble.

Such sentiments are said to have angered Suharto and certain top military officers, who suspected moderate dissidents of moving to link with radical Islamic elements. Of particular concern, according to Indonesian and foreign analysts, was the prospect of unrest during 1987 general elections.

The concerns have been heightened by a slowdown in Indonesia's economy, which is expected to record real growth in gross domestic product this year of less than 4 percent, compared with about 6 percent last year. Mines and Energy Minister Subroto recently predicted a potentially damaging drop in oil prices in 1986. Oil and natural gas account for more than 70 percent of export earnings.

In the current trial of Dharsono, the prosecution has charged that the white paper, which he signed, is subversive.

According to defense lawyers, a pattern is emerging in which government prosecutors in various trials seek to link persons charged with bombings and arson to moderate dissidents through antigovernment meetings.

Among those already convicted is Mohammed Sanusi, 64, a former minister of small industries and a signer of the Petition of 50. He was sentenced in May to 19 years in prison for aiding seven Moslem militants who in October 1984 bombed two offices of the Bank Central Asia owned by Liem Sioe Liong, a longtime friend and business associate of Suharto.

Another Petition of 50 signer currently on trial is Moslem preacher Andi Mappetahang Fatwa, who is accused of subversion with six other Moslem firebrands for delivering antigovernment speeches.

While not a signer of the petition, Dharsono has been closely identified with the group. A former commander of the Army's key Siliwanggi Division from 1966 to 1969, Dharsono later served as the first secretary general of ASEAN.

At the start of Dharsono's trial before a panel of three judges in mid-August, the chief prosecutor named eight prominent Indonesians who he said would be called as witnesses and later tried.

They included retired Lt. Gen. Ali Sadikin, 58, a popular and wealthy former Marines commander who served as governor of Jakarta from 1966 to 1977, retired police chief Hugeng Iman Santoso, 64, former prime minister Syafrudin Prawiranegara, former member of parliament Anwar Haryono, 62, retired Air Force Marshal Suyitno Sukirno and former oil and mining minister Bratanata, 57. All are Petition of 50 signers.

According to Sadikin, whose house was the site of one of the meetings cited by prosecutors, the dissidents plan to keep issuing statements. The latest questioned the government's purchase of 30 percent of the country's largest cement firm, owned by Liem Sioe Liong, in what is widely seen as a bail-out of Suharto's friend.

"These are people who suffer from the post-power syndrome," said Clara Joewono of the Center for International and Strategic Studies, a government think tank. "During their terms of duty they didn't act differently from the people who are in power now."