Fighting broke out in several sections of Kabul this week as the Soviet troops launched an offensive against a suspected rebel camp in the hills just outside the Afghan capital, according to Afghan sources and diplomatic reports reaching here today.

Some of the fighting in the Afghan capital, which is out of bounds to Western reporters, was believed to involve attacks on Soviet strongholds in the city while in other cases it may have involved battles between the two feuding factions of the ruling Marxist People's Democratic Party of Afghanistan.

Two separate diplomatic missions reported heavy gunfire both Sunday and Monday in the vicinity of Kabul Airport, which has been turned into a major military base since the Soviets moved into the country with more than 80,000 troops eight months ago.

While it is unclear who was doing the fighting, there were some reports in Kabul that rebel bands had tried to attack the heavily guarded airport. Lending credence to that report, Soviet M124 helicopter gunships were seen Monday launching an attack about one mile east of the airport.

Also on Sunday and Monday, heavy firing was heard in an entirely different section of the city, the Khair Khana neighborhood, which is just below a major encampment of Soviet troops and tanks stretched along the hillsides surrounding Kabul.

One mission described unconfirmed reports of Soviet casualties during the fight while another quoted that several persons were probably killed but said it was unclear whether the battle was between Soviets and rebel forces or part of the continuing violent feud among Khalq (masses) and Parchem (banner) factions of the ruling party.

There were also unconfirmed reports of attacks Sunday near the Darulaman Palace, where Soviet generals have set up their headquarters and where a large contingent of Soviet troops is bivouacked.

Meanwhile, reliable sources told diplomats in Kabul that the Soviets launched an attack Sunday on a suspected rebel stronghold in the hills near Paghman, a resort and agricultural town just 12 miles from Kabul.

As a result of the increased instability in and around the Afghan capital, diplomats reported stepped-up spot checks on traffic in Kabul. The diplomats reported continued nightly assassinations -- with unconfirmed rumors that they had reached into the family of the Soviet-installed president, Babrak Karmal -- and fears of greater impending violence.

The Babrak government, meanwhile, intensified its campaign to blame the instability in the country on "U.S. imperialism and Chinese chauvinism." It invited diplomatic missions in Kabul to a meeting last Sunday at which government officials said American, Pakistani, Iranian and Egyptian agents had been captured. Diplomats said they know of no foreigners under arrest as agents.

At a press conference the same day, a man who identified himself as an Iranian confessed to being a rebel and said the American Central Intelligence Agency was responsible for the insurgency.