ISLAMABAD, PAKISTAN, MARCH 1 -- Pakistan, entering a critical round of U.N.-sponsored talks in Geneva Wednesday on ending the war in Afghanistan, is prepared to show flexibility but is undecided on whether it finally will sign a peace agreement, according to well-informed diplomats and Pakistanis.

After a special closed session of Parliament and last-minute Cabinet meetings, Prime Minister Mohammed Khan Junejo said late yesterday that a final Pakistani position will be adopted after consultations with opposition parties this weekend, when the opening positions of the communist government in Afghanistan, the other party to the talks, become clear.

The Pakistani position, and uncertainty over final Soviet intentions, have added an air of drama to talks that are seen by many as possibly the last hope for an accord.

The key question for Pakistan is whether to stick to its recent demand that all parties agree to a new Afghan government before a peace treaty can be signed.

Pakistan fears that without such an agreement, millions of refugees will refuse to return to Afghanistan in the aftermath of a Soviet troop withdrawal for fear of continued factional fighting.

Up to 120,000 Soviet troops invaded Afghanistan beginning in 1979, leading to the displacement of as much as half of Afghanistan's population of 13 million and to an estimated 1 million deaths and injuries.

Three million Afghan refugees have moved onto Pakistani soil during the fighting. The Afghan resistance is based here, and much of the aid to the resistance flows through Pakistan.

Most members of the ruling party who spoke in the closed session of Parliament on Sunday were in favor of moving ahead with an agreement, according to political sources who attended.

Opposition party spokesmen, with the exception of the conservative Jamaat-i-Islami and Benazir Bhutto of the Pakistan People's Party, also have spoken in favor of a quick resolution of the Afghan issue.

Soviet leader Mikhail Gorbachev increased the stakes in this round of the talks when he announced in a television address on Feb. 8 that he was prepared to start withdrawing Soviet forces on May 15 provided an agreement was reached in Geneva by March 15.

But Gorbachev rejected the Pakistani demand that a new government for Kabul be included in an overall settlement.

Pakistani President Mohammed Zia ul-Haq has said he would not sign an accord with the present Afghan government of President Najibullah.

That has raised a question of whether U.N. special negotiator Diego Cordovez would broker a withdrawal agreement only to see it founder on the issue of an interim government.

{In Geneva, Afghan Foreign Minister Abdul Wakil said Tuesday that his government is entering the talks with "great hopes and no preconditions," which diplomatic observers said appeared to leave the door open for discussion of an interim regime, special correspondent John Parry reported.

{Najibullah told a mass rally in Kabul that Afghanistan is prepared to accept rebel leaders into a new coalition government, correspondent Gary Lee reported from Moscow.

{Observers said the statement was viewed as part of a campaign to pressure Pakistan to drop its objections to a peace accord.}

"I think they {the Pakistani government} will keep pushing until the middle or end of the month on the interim government and then make a decision," said one well-informed diplomat, adding, "I don't think they will get it."

That would put Pakistan in the position of having to decide whether to sign the withdrawal accords.

"There is a feeling in the air that we will get a withdrawal agreement, that they will go ahead and sign it," said a Pakistani with close ties to the country's top leadership. "Junejo's inclination is to sign, but he is looking for a consensus. Zia is less anxious, but my gut feeling is that he won't veto."

The prospect that many refugees might refuse to return to Afghanistan frightens many Pakistanis. "We have welcomed our Afghan Moslem brothers, but it is time for them to go home.

But the conditions have to be right," said one top Pakistani official recently.

The degree and length of any turmoil, in turn, are likely to depend on the strength of the government in Kabul once Soviet forces withdraw.

The Pakistan-based guerrillas are to be cut off from further arms supplies once the Soviet withdrawal begins, 60 days after the Geneva accord is signed.

The U.S. assessment, according to diplomats, is that Najibullah very quickly will be reduced to controlling only Kabul and that the rebel mujaheddin will have sufficient arms supplies to take over the country.

"A lot of steps will be taken to make sure they have a lot on hand come May 15, and humanitarian aid also will continue," said one diplomat.

Nevertheless, mujaheddin leaders have been complaining recently about erratic arms flows. Whether this has been the result of pressure on the guerrilla leaders or simply technical problems with supplies is unknown.

According to analysts and diplomatic sources in Islamabad, much will depend on the opening positions on key issues presented by the Kabul government when the Geneva talks open Wednesday.

These issues include the length of time for Soviet withdrawal, the numbers and types of troops to be withdrawn during the early stages of the pullout and Soviet willingness to limit arms aid to the Najibullah government.

Other details include conditions for the return of refugees and arrangements for monitoring the Soviet pullout and the guarantees of noninterference by outside powers.

U.N. negotiator Cordovez reported "virtual agreement" on these issues following a recent round of shuttle diplomacy between the Pakistani and Afghan capitals. But Pakistani diplomats and others familiar with the progress of the talks said final Afghan-Soviet positions have not been spelled out, even after Secretary of State George P. Shultz's recent talks with Soviet leaders in Moscow.

Shultz left those talks declaring that he was convinced of Soviet sincerity about a withdrawal.

Pakistani diplomats are likely to insist on a time frame shorter than the 10 months offered by Gorbachev on Feb. 8, and there is some feeling among diplomatic observers that this figure could come down.

Public commitments by Moscow not to arm Afghanistan in the future remain unlikely, although private assurances seem more feasible.

After years of unacknowledged support of a guerrilla movement against Soviet forces, the United States also must decide whether conditions are right to ensure that Moscow does not win at the bargaining table what it has not been able to secure on the battlefield.

"Once the arms supplies are cut off to the mujaheddin, it will be impossible to start them again. Pakistani public opinion just wouldn't permit it. It is a card you can play only once," one knowledgeable Pakistani said several months ago.

The Reagan administration, keeping in mind pressure from its own conservatives, appears to have decided that the Najibullah government will fall and that the mujaheddin will have sufficient arms to keep fighting until it does, provided the Soviet Union keeps its word and a sufficiently short time span for withdrawal is negotiated.

Moscow, too, has had to make difficult decisions, not the least of which is the first withdrawal of Soviet forces from a foreign position since the 1955 pullout from Austria.

Still facing Moscow is the question of whether to press for an interim regime that would bring a degree of calm on its southern border with Afghanistan but also involve the end of the communist People's Democratic Party government.

For mujaheddin political leaders and field commanders, the issues also are difficult. After eight years of fighting that began with little more than old British-era weapons and evolved to modern Stinger missiles, the prospect now is for more warfare unless there is room for political compromise.

A recent resistance formula for a future government leaves room for "good Moslems" from the current Kabul regime but rules out any figures from the People's Democratic Party.

Nor is it clear whether the mujaheddin can continue to avoid internecine conflict once the glue of the fight against Soviet forces is removed.

For supporters of the Kabul regime, the decisions are more clear-cut.

For some, there may be the option of fleeing along with retreating Soviet forces, if the Russians will have them, or of staying to fight advancing guerrilla forces. Others, in lower ranking positions, may have little choice.