A Western resident of Kabul was describing the response he received when he invited his neighbor, an Afghan professor, to come to his house to watch a film.

"He said he couldn't do it, even after dark. He trusted me, he said, but be couldn't trust my servant not to report him."

That story encapsulated the atmosphere in the Afghan capital 10 months after the bloody coup that brought the pro-Soviet government of Prime Minister Nur Mohammed Taraki to power. By all accounts, the government, still trying to consolidate its grip on the country, rules through fear, arrest and suspicion, discouraging contact with foreigners and suppressing dissent with a heavy hand.

At night, just before the 11 p.m. curfew enforced by the army, powerful spotlights play across the city as if to surprise subversive elements on their furtive rounds. The streets are nearly deserted well before curfew because, residents say, it is unwise to attract the attention of police patrols.

Unlike Marxist-ruled Ethiopia, which gave extensive publicity to its armed conflict with alleged counterrevolutionaries, the Taraki leadership claims there is no opposition and that all Afghans have supported the revolution from the beginning.

It is true that there is no counterpart here to the bloody gunfights and house-to-house searches with which the Addis Ababa govetnment fought its foes at a comparable stage of the revolution. On the other hand, it is apparent that Taraki and his allies in the Peoples Democratic Party of Afghanistan have spent much of their time since the overthrow of President Mohammed Daoud last April purging potential rivals and dissenters.

The army, the civil service and the party itself have been stripped of prominent figures who have been executed, jailed or sent into exile -- so much so that experienced foreign diplomats say they do not know who is chief of staff of the army because there is hardly anyone still in uniform above the rank of major.

Politically unreliable intellectuals have been put out of the way. Foreign residents report that scores of doctors, professors and lawyers are "sitting home." doing nothing and avoiding any contact that might arouse suspicion. So intense is the suspicion of Westerners that the director of the official news agency, whose approval is required before any dispatches can be sent abroad, refused to allow journalists who had just interviewed the foreign minister to sit at a table in his office to prepare their articles.

The government has moved swiftly against religious leaders who oppose what they see as the procommunist and atheistic tendencies of Taraki's party. In January, well-informed sources report, one of the leading religious figures in Kabul, Ibrahim Mujadidi, was arrested along with several dozen relatives and friends, leaving other family members to carry on their opposition from exile across the border in Pakistan.

Shortly before that Hafizullah Amin, the foreign minister who is considered the secone-ranking man in the government, issued a blunt warning to the religious community.

"Those religious leaders who are busy with religious performances and do not act against the interest of the people and the revolution will be respected profoundly by us," he said. "But those who instead of serving jthe sacred religion of Islam use religion as a means to serve the enemies of the revolution will face repercussions."

Senor diplomats here say that forth-right approach is typical. "They make no apologies," one ambassador said. "Virtue is defined as support of the revolution."

"This is a violent society where scores are settled by killing," said another. "These people came to power on a wave of blood. They can't relax much."

Opponents of Taraki based in Pakistan describe his rule as a Stalinist dictatorship, ruling by brutality. The actual situation appears to be considerably more complicated.

Taraki and his supporters have acknowledged that their base of popular support was small when they seized power. An official history of last April's coup notes that it was engineered by a small group of army officers who subscribed to Taraki's theories and makes no claim that it was a popular uprising.

"They've been very frank about it," one source said. "They decided that if they wanted to wait until they had mass public support it might take 30 years, so they decided to take power first and then build their base."

The government's technique has been to combine purges of "feudal" elements left over from the Daoud government and the monarchy that preceded it with populist measures aimed at increasing the number of people indebted to the government and to the party.

Some cadres sent into the villages to preach the revolutionary program have been resisted, even killed, by Afghans hostile to what is seen as a procommunist, antireligious regime dominated by the Soviet Union. The government has responded with swift punitive actions.

The combination of military reprisals against recalcitrant villagers, mass arrests in the cities and a sputtering campaign against an insurgency among tribesmen in the eastern provinces gives the impression that the Afghan leadership is embattled and struggling to survive, but experienced observers here say that is not necessarily the case.

They say the opposition, political and religious, is weak and fragmented and that repeated purges in the army and civil services have eliminated most potential sources of disloyalty. These observers also say that some of the measures taken by the government to elicit popular acceptance appear to be succeeding, especially a large-scale land reform program launched in January.

"The class of people who owe something to this government is growing," a senior diplomat said." They were trying to create a large number of people whose interests are tied up with those of the revloution, and kthe number of those who benifit is greater than the number of those who are hurt."

Diplomatic sources say there is deep skepticism about whether the government can enforce two of its decrees, abolishing usury and dowries but that land reform is making headway. It is being run by the party, not by civil servants, again in a move to inspire party loyalty.

Foreign Minister Amin, asked recently about security measures in the capital, said they would be ended when the land reform is completed, probably this year.

About 200,000 families in a country of about 16 million people will receive parcels of land from the estates of big landowners, he said.

"There's no country in the world where land reform is going on so smoothly as here. When it is completed there will be no more need for any security measures," Amin said.

He made no claim, however, that there would be any liberalization of political life. Afghanistan is officially a one-party state and the press, economy and government are being molded into the service of that party.