Moslem insurgents and dissident Afghan Army soldiers continued to fight Soviet troops in Afghanistan's rugged countryside today, with clashes reported in at least three provincial capitals, according to diplomatic and rebel sources.

Five days after the Soviet-led coup, however, Afghanistan remained largely inaccessible to outsiders, and communications with the country had not been restored.

The only direct sources of news were the official agencies of the Soviet and Afghan governments, but their accounts, describing the situation in Kabul and other cities as calm and under control, were contradicted by diplomatic and rebel sources outside the country.

The Soviet Army was spreading throughtout the mountainous countryside but was running into resistance, a Western diplomatic source said here.

He said there were reports of clashes between Afghans and Soviet troops in the provincial capitals of Kandahar, 275 miles southwest of Kabul, and Jalalabad, 75 miles east of the capital.

There also were reports of resistance in Herat, 400 miles west of the capital, but the source said the city was soon put under Soviet control. Herat was the scene of a bloody uprising in March in which at least 60 Soviet troops were killed. Harsh reprisals by government troops caused numerous casualties afterward, diplomatic sources said.

Diplomats in Kabul also reported that Soviet troops had taken up positions within 35 miles of Pakistan at the Khyber Pass, Afghanistan's only land route to the east.

Soviet forces reoccupied a post in the Badakshan Province in northeast Afghanistan after 90 hours of fighting with heavy casualties on both sides, according to a correspondent for the Pakistani newspaper Jang.

The newspaper reported that the rebel leadership said Soviet warplanes dropped napalm, killing women and children. The locations of the alleged raids were not given.

The pro-Moslem newspaper also reported heavy fighting in the eastern province of Nuristan, including air raids that destroyed a mosque and may have killed as many as 260 worshipers.

Moslem rebels claimed to have captured another military base at Chigh Serai after a three-day battle in which a brigadier general and nine other Afghan Army officers deserted to the rebel forces, the newspaper reported.

Some machine-gun fire was also reported in Kabul, but the Soviet troops patrolling the streets were still firmly in control of the city, according to a diplomatic source here.

The Soviet troops, estimated by U.S. officials to number between 30,000 and 40,000, arrived last Wednesday. They apparently took part in the overthrow of the communist government of president Hafizullah Amin and replaced it with a government headed by Babrak Karmal.The Soviets have denied that they had any role in the coup, but have said they sent in their troops at Kabul's request to help fight armed aggression from outside. The troops will be "fully withdrawn" when they are not needed, the Soviet news agency Tass said today.

The Afghan military, estimated by the United States at 80,000 to 90,000 men a year ago, was reported to have dwindled to no more than 10,000 to 15,000 effective troops even before the coup on Thursday. Most of the remaining Afghan military have been out of sight since the coup, the U. S. analysts expressed doubt that more than a few garrisons with a few hundred soldiers each are still capable of funtioning.

U. S. officials estimate that about 250 Soviet troops have been killed or wounded since last week's massive Soviet intervention. Previously some Soviet troops had been advising Afghan officials fighting the Moslem insurgents.

The Moslems have battled against successive Soviet-backed governments for 20 months, claiming that Communist leaders disrupted centuries of Islamic traditions with Marxist-oriented reforms.

Despite their continued fighting, the Moslem insurgents are demoralized by Moscow's show of force, according to one rebel leader here.

"With our poor guns, fighting Russian tanks and helicopters would be like shooting an elephant with a pea shooter," he said.

Meanwhile, the new government in Kabul anounced that it considers the U.S. denunciation of the Soviet intervention as "interference" in Afghan affairs.

A government communique, broadcast by Radio Kabul and monitored in Islamabad, Pakistan, said that Afghanistan requested the Soviet assistance and that U.S. "propaganda" had tried to divert world attention from the Iranian hostage crisis.

It was also revealed here today that Hubert van Es, a Dutch-born free-lance photographer on assignment for Time Magazine, has been detained in a Kabul hotel.

Van Es, who is based in Hong Kong, was detained by Afghan authorities when he refused to board an Indian Airlines plane along with other Western newsmen who were expelled from Kabul Sunday, according to a spokesman for the magazine.

The foreign journalists were the first to reach the Afghan capital after last week's coup, but Afghan officials said they had to leave after seven hours because their safety could not be guaranteed.