PESHAWAR, PAKISTAN -- Afghan guerrilla commanders have forced Pakistan's military intelligence service to give up plans for a guerrilla offensive on the Afghan capital that Pakistani officers had hoped would install a government under their influence, Afghans and diplomats said.

The guerrillas vetoed the October offensive partly because they did not want to fight under Pakistan's chosen commander and because of fears of high civilian casualties. In heading off the attack, the guerrilla leaders succeeded in their biggest direct challenge to the Pakistani military establishment, which exercises substantial control over their campaign.

The challenge was mounted by a recently created council of independent guerrilla commanders that many observers have said represents the guerrillas' strongest bid to develop a unified leadership independent of Pakistan and capable of posing a serious threat to the Soviet-backed Kabul government.

The conflict between the new, resurgent guerrilla, or mujaheddin, leadership and the Pakistani military could intensify following the election Oct. 24 of a rightist Pakistani government that appears to have strong links with the military. Many in the new ruling coalition -- including Nawaz Sharif, its nominee for prime minister -- were long aligned with the military government that ruled Pakistan for 11 years until 1988.

Since at least late August, according to diplomats and Afghan sources in Pakistan and officials in Washington, Pakistan's Inter-Services Intelligence agency (ISI) had been preparing an offensive on Kabul to be led by Gulbuddin Hekmatyar, a radical Moslem fundamentalist who for years has been favored by the Pakistani military as a future ruler of Afghanistan.

ISI, which controls the distribution of CIA- and Saudi-supplied weapons to the mujaheddin, shipped large amounts of arms to Hekmatyar's forces and pressed other guerrilla groups to support his assault, the sources said.

Most guerrilla leaders, however, rejected the offensive, telling Pakistani officers that it risked defeat and high civilian casualties. The mujaheddin leaders also said they would not fight under Hekmatyar, who is seen by many Afghans as being too much under the influence of the Pakistanis and Arabs.

Hekmatyar's forces launched attacks on Kabul's defensive perimeter beginning Oct. 10, but the assault fizzled after several days.

The aborted offensive also underscored differences between the State Department, which is pursuing disengagement from the Afghan war, and the CIA, which seeks an outright guerrilla victory, according to accounts from sources in Pakistan and Washington. The State Department argued against the assault, echoing the objections of the guerrillas, but, according to mujaheddin and diplomatic sources in Pakistan, CIA officers in Pakistan urged guerrilla commanders to join the attack.

The guerrillas' veto of ISI's proposed offensive was the first major political victory of their National Commanders' Council, formed by nationalist commanders last spring to challenge Pakistan's domination of their movement. The council succeeded largely because it won the support of Ahmed Shah Massoud, a staunchly independent guerrilla commander whose political and military organization dominates Afghanistan's northeastern provinces.

According to U.S. officials, the CIA hopes the council will revive the guerrillas' stagnant military campaign and topple the government of President Najibullah, although the agency is said to regard Hekmatyar -- who is distant from the council -- as critical to any military victory. Officials said the State Department hopes the council can provide a unified leadership that is credible to the millions of Afghans who reject the Najibullah government -- something the current, Pakistani-backed mujaheddin leaders have been unable to do.

But even the most optimistic U.S. officials worry that the council could fall into the same tribal, ethnic and factional infighting that has divided the Pakistani-backed mujaheddin structures throughout the war. Also, the council's effectiveness still could be hampered by a hostile ISI, and diplomats in Pakistan and U.S. officials in Washington disagree on how readily ISI will cooperate with it.

ISI officers "are saying that they've seen the light," and now recognize the mujaheddin's rejection of Hekmatyar and of ISI-dictated strategy, one diplomat said.

But the current ISI policy has deep roots, many analysts said. Ever since the Afghan mujaheddin began their struggle following a Soviet-supported communist coup in Kabul in 1978, the army and the right-wing Moslem fundamentalist movement in Pakistan have tried to dominate the Afghan guerrillas as a way of gaining influence in what for Pakistan is a sensitive neighboring state. Cooperating with the new council and giving up hopes of installing Hekmatyar would be a difficult change for ISI -- especially following last month's election victory by rightists who are political heirs of the existing policy's architect, the late military ruler Mohammed Zia ul-Haq.

The conflict between nationalist Afghan guerrillas and ISI grew acute after the Soviet Union pulled its occupation forces out of Afghanistan in February 1989. ISI withheld arms to anti-Hekmatyar guerrillas and pushed other mujaheddin into a Hekmatyar-led frontal assault on the eastern city of Jalalabad that produced one of their biggest defeats of the war.

ISI heavily influenced the formation of a mujaheddin government-in-exile that included Hekmatyar, even though he has a minuscule political base among the traditionalist Afghan population. The so-called Afghan Interim Government was paralyzed by divisions between traditionalist parties and Islamic revolutionaries such as Hekmatyar, and excluded groups such as the Moslem Shiite minority and tribal leaders loyal to Afghanistan's former king.

Mujaheddin commanders, frustrated by the stalemate in the war and by ISI domination of the Afghan Interim Government, organized the National Commanders' Council last spring. Since late summer, the council and ISI fought for Massoud's support over strategy. ISI lobbied for the Kabul offensive, but the commanders argued instead for a series of assaults on provincial capitals and the building of a unified military force, according to sources in Pakistan and Washington.

In mid-October, as ISI and Hekmatyar launched their offensive, Massoud met at the Pakistani-Afghan border with the commanders' council and Pakistani officers, including ISI's director, Gen. Asad Durrani, and its former chief, Gen. Hamid Gul, diplomats in Pakistan said. The Afghans refused to join Hekmatyar, they said, and the offensive collapsed.

Massoud, who had not left Afghanistan during the 12 years of war against Kabul, then traveled to Islamabad to make the commanders' case to Pakistan's army chief, Gen. Aslam Beg, President Ghulam Ishaq Khan, U.S. Ambassador to Pakistan Robert Oakley and Hekmatyar.

In an Oct. 27 press conference in Peshawar, Massoud said he and Hekmatyar would hold elections in northern Afghanistan this winter to settle peacefully conflicts between their supporters there. He said the commanders' council would use the harsh winter months to build a new administrative structure within Afghanistan and to set military strategy for the spring.

State Department officials and a CIA spokesman declined to comment on the reports from Pakistan that U.S. diplomats and CIA officers there had been taking opposing positions on the offensive in talks with their Afghan and Pakistani interlocutors. But several officials in Washington, who asked that their names and agencies not be disclosed, said the State Department and CIA disagree over basic policy in the Afghan conflict.

The CIA continues "to look at it as a war, while {other agencies} look at it as a political problem that can be resolved by negotiations and compromise," said one official.

During the 20 months of Afghan military stalemate since the final Soviet troop withdrawal, congressional support for the CIA's covert aid to the mujaheddin has declined. Last month, Congress's intelligence committees cut the aid by 10 percent and insisted on releasing only half of it, withholding the rest for further consideration in the spring.

Since last year, the State Department has stopped emphasizing that the mujaheddin can win on the battlefield, and officials have spoken instead of slow, steady progress in talks with the Soviet Union for a superpower disengagement and elections to end the war.

Coll reported from Peshawar, Pakistan, and Rupert from Washington.