America's top diplomat in Kabul for the past 16 months said the Afghan resistance emerged from this year's massive Soviet spring offensive stronger than ever in what has become "a durable stalemate" that appears unlikely to change in the near future.

More than 100,000 Soviet troops "have by no means broken the back of the resistance," which is "confounding the logic of brute force," said Charles F. Dunbar Jr., who just returned after serving 22 months in Kabul, the last 16 as head of the small embassy there.

Dunbar's appearance last week at a luncheon here of overseas writers was one of the few times American diplomats stationed in Kabul have been willing to speak on the record about events in Afghanistan since the Soviets invaded that landlocked, Texas-sized nation in December, 1979.

Although the Soviet offensive was exceptionally heavy, he said, the resistance has regained control of Kandahar, Afghanistan's second largest city, "despite a really incredible bombardment" that damaged one-third of its buildings so badly they cannot be lived in.

The forces are so active in villages and roads around the city, Dunbar said, that reports are circulating in Kabul that the Soviets may be forced to send troops there.

Fighting has stopped in the third largest city of Herat--located in western Afghanistan where the Afghan, Iranian and Soviet borders come together--but the resistance survived this spring's "intensive but selective" air and artillery bombardments to regroup in villages north and west of the city.

Bands of resistance fighters reign supreme in most of the countryside, Dunbar said.

Police officers told him of being ordered to hand over guns and ammunition to the resistance, he said, but added that resistance fighters refrain from killing goverment officials for fear of provoking massive Soviet attacks on their villages.

Police officials often refuse to fire at armed guerrilla bands, Dunbar said, and there are reports of resistance-operated buses running within 100 feet of government posts.

Dunbar said the resistance is growing more effective militarily, though unity remains an elusive goal among the seven major rebel organizations that have their headquarters in the Pakistani Khyber Pass city of Peshawar. There have been cases, however, where resistance fighters inside Afghanistan have cooperated--especially in battles around Paghman, the old summer capital 15 miles north of Kabul.

Paghman, a rocky, hilly area, has been a hotbed of the resistance that is especially embarrassing to the Moscow-installed government of Babrak Karmal because it is so close to Kabul that diplomats readily hear about battles there.

Although he said the United States favors the United Nations-sponsored peace talks in Geneva, he saw little chance of success unless the Soviets want a forum to change their position on Afghanistan. The current round of talks ended Friday with no sign of progress.

Dunbar said the Soviets appear committed to maintaining communist control of Afghanistan despite the deaths of 10,000 to 15,000 troops so far. About 5,000 Soviet civilians hold Afghan government positions, and 10,000 to 20,000 Afghans have been taken to the Soviet Union for ideological and administrative training to replace western-oriented bureaucrats who continue to flee the country.

"Time," Dunbar said, "is on the side of the Soviets in a long-term war of attrition," which could run until the end of this century and end with Afghanistan becoming a virtual Soviet colony such as Mongolia.

"It's going to be a very long war indeed under the present ground rules, with a lot of Afghan suffering," he said.

But Dunbar said the situation is likely to change eventually--either through resistance forces increasing the cost of the war to the Soviets by becoming a more effective political force or with a massive escalation of the Soviet military commitment.

Most experts believe that will mean increasing the Soviets' current strength of 105,000 troops to around a half million--close to the peak force of 620,000 the United States had in Vietnam.