The Afghans have already made repairs at the Kabul Hotel to hide traces of the gun battle in which U.S. Ambassador Adolph Dubs was killed, and the government of Prime Minister Noor Mohammed Taraki has denounced his kidnaping and ordered flags in Kabul flown at half staff.

Despite the gestures, however, the political repercussions of the killing are still being felt. Americans here believe the Afghans may have provoked the ambassador's death unnecessarily by attacking when they should have negotiated. And the fact that they did so in the presence of their Soviet police advisers has led to strong American protests to the Soviet Union.

The political reaction also is complicated by frustration. The identities and motives of the four men killed in a shootout in Room 117 after kidnaping Dubs on his way to work two days ago remain a mystery.

No political or religious group has claimed responsibility. If Afghan security officials have learned who the young men were, what they really wanted and why they marched their captive right through the lobby of a popular hotel instead of hiding out, they are keeping the information to themselves.

There have been none of the clandestine radio broadcasts or anonymous leaflets often associated with political or religious opposition movements. The attack, observers here say, could have been inspired by anything from religious opposition to the leftist government to dissent within the ruling Khalq Party. But it is taken for granted that it was somehow part of a larger pattern of political and religious violence and conflict afflicting this impoverished country.

An editorial in today's official Kabul Times said. "This act of the enemies of the peoples of the world is regarded as nothing but stupidity and narrow-mindedness and a criminal act against the good relations of two friendly nations."

It said that "the people and government of the Democratic Republic of Afghanistan and of the U.S.A. are fully aware of the acts of their enemies. They know that such provocative acts will not undermine the friendly relations between the two countries."

Experienced diplomats here, however, believe that whoever the ambassador's kidnapers were, their objective was not to attack the United States or its policies, or even to damage U.S.-Afghan relations, but to embarrass Taraki's pro-Soviet government.

Witnesses to the shootout said it was preceded by negotiations shouted through the keyhole in which the kidnapers demanded the release of at least three persons they said were being held in Afghan jails.

Official Afghan accounts said they wanted a man named Badruddin Bahes turned over to them. The government says he is not in the country. Western diplomats say they have not heard of any such person and thus do not know what this reported demand represents in political terms.

The Americans here, who never had a chance to negotiate directly with the kidnapers, are understood to be preparing a normal request to the Afghan police for a full report.

Several sources have indicated that the kidnapers wanted release of three mullahs or Moslem religious leaders. Several prominent Afghan religious figures have been arrested recently, apparently because of the threat their Islamic views pose to the government.

Among them is Ibrahim Majaddidi, a member of a leading religious family and the most prominent religious leader in Kabul.

Early reports that the ambassador's attackers were members of the Shiite sect of Islam, emboldened by the success of the Shiite revolution in neighboring Iran, have since been contradicted. The vast majority of Afghans are Sunni Moslems and well-informed observers here say flatly that there is no discernible link between the attack on Dubs and events in Iran.

Kabul itself is quiet. The city already was under curfew as Taraki and his Soviet advisers sought to control popular discontent.

There is no indication that the attack on Dubs presages violence in the capital but some observers believe that sporadic antigovernment outbreaks in the mountains may finally have spilled over into Kabul.

Afghan exiles have been attacking the government from headquarters in Pakistan and have had contacts with rebel groups in Afghanistan's eastern provinces. So far, there is no evidence linking the men who kidnaped Dubs with those groups.

According to accounts of the kidnaping and shootout pieced together from various sources -- which occassionally vary from the official government version -- Dubs was kidnaped when a man in a police uniform approached his ochre Oldsmobile at an intersection and pulled a gun on the Afghan chauffeur.

The car was flying the American flag and Dubs had no guard riding with him. Diplomats here say that is standard practice for Western ambassadors, who have had no previous reason to fear attacks of this kind.

The gunmen forced the chauffeur to unlock the doors, and the man in uniform was then joined by three other young men who took Dubs in the car to the Kabul Hotel, in the center of town. At least two walked through the lobby and barricaded themselves with Dubs in the room on the second floor.

American Embassy officials, three Soviet police advisers and the security officer from the Soviet Embassy, Sergei Bakhtourin, joined Afghan police at the hotel. The Americans were urging the Afghans to delay, negotiate and stall, standard antiterrorist practice, and believed they had the cooperation of the Russians in this approach.

The Afghans, however, saying they had been told by the kidnapers in the room to meet their demands in 10 minutes or Dubs would be killed, stormed the room in a 40-second onslaught that left the interior filled with cordite smoke.

An American Embassy medical team found Dubs seated in a chair with several bullet wounds in his head and chest. It may never be known whether the kidnapers killed him or he was hit by police bullets.

Afghan officials say the bodies of all four kidnapers were found in the room. Independent witnesses, however, say that at least one was taken away alive. When and where he died is not known. But his body was in the morgue with the other three several hours later when Bruce Flatin, political counselor of the American Embassy, was called in by the Afghans to see them.

Diplomats here say the key question now is not discrepancies in the accounts of the kidnaping, or even the role of the Russians, but the identity and affiliation of the kidnapers.

Witnesses said the police who were talking to them through the door of the hotel room addressed one as "Najib". But that may have been a code name. The men clearly were Afghans, but may have spoken some English. The police at one point asked Flatin, who was at the hotel, to talk to Dubs in some language other than English. The two exchanged a few words in German before the kidnapers halted the conversation.

As Mrs. Dubs and a high-level State Department delegation arrived today to take the ambassador's body home, it was clear that the incident had further soured already tense relations between Afghanistan and the United States, despite the government's conciliatory statements here and similar statements from the Afghan Embassy in Washington.

American officials here will not discuss the incident publicly. It is apparent, however, that they are annoyed over their inability to get through to Foreign Minister Hafizullah Amin or police commander Syed Daoud Tarun during the negotiations to ask them to delay the attack.

Bruce Amstutz, who was Dubs' deputy, had been authorized to say that Secretary of State Cyrus Vance was appealing personally to Amin, but he was unable to reach the minister, who was occupied with the visit of Iraqi Foreign Minister Saadoun Himadi.

Relations between Afghanistan and the United States have been chilling steadily since Taraki seized power in a bloody coup last April that ousted President Mohammed Daoud.

Taraki, who is closely aligned with the Soviet Union strategically and ideologically, has steadily cut this country's cultural and economic ties with the United States.

The prevailing diplomatic opinion here, however, is that he had nothing to gain from the killing of the American ambassador and that when the security forces stormed the room, they did so in the sincere belief that it was the only way to save him.