As the setting sun glints off the white pagodas dotting the hills of this town in central Burma, a steamy mist rises from the plain below, mingling with the smoke from a thousand fires.

A Buddhist monk surveying the scene by the banks of the Irrawaddy River softly chants a prayer as the strains of Burmese music waft from the town below and people begin preparing the dawn meal for the area's 10,000 monks.

But the serenity of Sagaing, considered the religious center of what is probably the most devoutly Buddhist country in the world, belies a certain ferment in the Burmese monk community these days. In a purge backed by Burma's socialist government, unorthodox doctrines have been put on trial and monks have been defrocked for unbecoming conduct.

The purge seems to have widespread support, for the 100,000 Burmese monks had acquired a reputation for harboring loafers content to live off charity and to engage in some less-than-devout activities on the side.

On the other hand, some Burmese seem to have misgivings about what they see as government involvement in religious matters. They argue that a heretical or just plain bad monk will get his just deserts in the next life, according to Buddhist doctrine.

In any event, the court cases have aroused great interest among Burma's 85 percent Buddhist population, although some of the trials involve doctrinal points that even the devout find difficult to follow.

The interest illustrates the central place that Buddhism occupies in Burmese life. Although the government is resolutely socialist and secular, the faith permeates its guiding philosophy, called "the Burmese way to socialism."

"Burma is a different socialist country than any other," a Western diplomat in Rangoon commented. "The Burmese way to socialism is the Buddhist way to socialism. Buddhism comes first."

In the view of some foreign and Burmese observers, the faith may explain some of the recent actions of Burma's leader, Ne Win, 70, who resigned last year as president but still runs the country as head of the ruling political party.

Because of the reclusiveness of Ne Win and his government officials, his actions seem to spawn much guesswork and rumor in diplomatic circles. One of the more intriguing rumors, which has gained a certain currency in the capital, has it that religious concerns influenced Ne Win's 1980 declaration of an amnesty for his political opponents.

"He's probably a late convert to Buddhism and wanted to clear his slate before he dies," a diplomat said. According to another account, a soothsayer told the former general he was heading for a fall, prompting him to enter a monastery for a few days before reaching his decision to declare an amnesty.

In any case, the amnesty and the purge of the monks are generally regarded as triumphs for Ne Win.

According to U San Daw Batha, the head monk in a large monastery in Amarapura across the river from Sagaing, "Ne Win is a very religious man." The 60-year-old monk, who said he knows Ne Win personally, added that "we have a socialist state here, but it has nothing to do with religion."

Asked about the current purge of the monkhood, San Daw Batha acknowledged that some people "feel sorry for" the purged monks.

"Personally I think it is better for the monkhood because some monks are not very strict," he added. "They take advantage of Buddhism. These are not real monks. They're heretical. Theirs is not the true religion. You cannot be a man again if you die. It depends on what you do in life."

He was referring to the court case that appears to have stirred the greatest interest among the faithful. It involves a sect that rejected the standard Buddhist beliefs about reincarnation, insisting instead that after a human dies he can only be reborn as another human, not as an animal or other being.

This also led to rejection of the fundamental law of karma, which states essentially that the sum of good and bad deeds in one's life determines the form of reincarnation into the next.

Following complaints by orthodox monks, a clerical court was formed consisting of judges from the 299-member central committee of the All-Burma Buddhist Monks' Organization, formed two years ago by the government to purify the monkhood and root out heresy. After a lengthy trial, the court late last year ruled against the sect, and the government ordered its dissolution. Rather than leave the monastic order, however, many of the sect's followers recanted.

Another doctrine that was found heretical preached that one need not go through a full cycle of rebirths to reach nirvana, Buddhism's state of eternal bliss and absorption into the supreme spirit. Instead, the sect said, it was possible to reach nirvana directly from the human world by adopting a life of complete mental and physical inactivity. The government also ordered this sect dissolved.

Somewhat more titillating have been the cases against monks accused of bad conduct. The most famous concerned a leading monk in Rangoon, U Nagathena, who violated the vows of celibacy by having eight wives and an undisclosed number of children, according to Burmese who followed the case. Described by one observer as "handsome and venerable-looking," the 60-year-old monk was ordered defrocked by a township-level clerical court.

In all, according to Burmese sources, about 100 monks have been defrocked for bad conduct, mostly involving sexual activity. About as many others have been expelled for doctrinal reasons, and about 5,000 have recanted, the Burmese sources said.

While some may lament the government's role in these matters and find a socialist state and devout Buddhism incompatible, it can also be argued that the generally strict nature of the faith in Burma requires such a governmental system.

A Burmese scholar explained that since Buddhism forbids killing animals, it is rare in Burma to find Buddhists engaged privately in raising poultry or livestock for slaughter or even in fishing, although the faith does not prohibit buying meat or fish for food after the animal has been killed.

"So the government needs to step in to form poultry cooperatives and so forth" to insert the state as a buffer between the job and the faith, this source said. "People will do this kind of work as a government service, but not as individuals," he said.