ISLAMABAD, PAKISTAN, OCT. 9 -- A car bomb exploded in Kabul, the capital of Afghanistan, Thursday evening, killing 27 persons and wounding 35, Kabul radio said today.

The state radio blamed the explosion on guerrillas fighting the Soviet-backed government and said it had killed women, children and old men near the Sher-pur mosque in Kabul's Shar-i-Nau district. The mosque is frequented by high government officials and Moslem diplomats, the radio said.

{The official Soviet news agency, Tass, quoting the Afghan state news agency, said the death toll was particularly high because the bomb was planted in a heavily built-up residential area, The Associated Press reported from Moscow. Kabul radio said 29 shops and a number of homes were damaged, United Press International said.}

It was the worst known terrorist bombing in Kabul since Soviet troops entered Afghanistan in December 1979 to sustain a pro-Soviet government that was in danger of being toppled by popular uprisings. During nearly eight years of war, attacks by Moslem guerrillas, called mujaheddin, and unexplained bombings have frequently struck Kabul.

Western analysts and Afghans sympathetic to the mujaheddin have blamed many such blasts on feuding factions of the ruling People's Democratic Party of Afghanistan.

Western diplomats in Islamabad, quoting their counterparts in Kabul, have reported several bombings and rocket attacks in the Afghan capital in recent weeks. The Afghan government has blamed them mainly on the mujaheddin.

Western sources have speculated that the recent violence in Kabul is evidence of continued fighting within the party. The party has been split into two factions since its founding in the 1960s. Afghan and western analysts say a further division has opened between party supporters of former leader Babrak Karmal and the man with whom Moscow replaced him last year, Najibullah.

The official radio, monitored in Islamabad, said the explosion was the work of "malicious and criminal extremist opposition elements," a code phrase for the mujaheddin.

City authorities asked citizens "not to allow . . . reactionaries to disturb the life of citizens and to inform security forces" of subversion, the radio said.

Bombings in Kabul have continued since Najibullah announced a "national reconciliation" plan at the start of the year.

Najibullah declared a unilateral cease-fire but the rebels rejected it and have continued fighting, aided by supplies of sophisticated western weaponry including U.S.-made Stinger antiaircraft missiles.

Attacks in Kabul since the ceasefire was announced included a car bomb explosion near the Indian Embassy that killed at least four persons and a rebel missile attack on a Kabul bus depot, both in February.