Stockholm — For the first time, the conditions needed to end the 18-month-old Gulf war have all come together.
But both Iran and Iraq appear to lack the political will to bring the war to a mediated conclusion.
''I have exhausted my possibilities,'' says the United Nations mediator and former Swedish prime minister, Olof Palme, after his fifth mediation mission to the two countries.
In an interview, however, the softspoken leader of the Swedish Social Democratic Party laid out the conditions which now push the two sides toward a settlement.
1. For the first time, Iran has a ''unified and consolidated government'' that can speak on its behalf, Mr. Palme explains. Its demands, for which Iran is expected to seek international support, are clear: Iraq must withdraw its troops prior to negotiations; it must be denounced as the aggressor; and reparation must be paid for war damages.
2. The increasing economic burden of the war for both sides spurs them toward a negotiated settlement. Diplomats estimate war damage at approximately $500 billion, 90 percent of it in Iran. Experts say the rebuilding of the Abadan oil refinery alone will cost $1.8 billion.
3. At the level of the general public, both Iranians and Iraqis show less enthusiasm for the fighting now than in the earlier stages of the war.
4. Iraq appears to realize that neither side can achieve a military victory. Iranian officials, nevertheless, insist that Iran is capable of ultimately pushing Iraq back to the pre-September 1980 borders.
Mr. Palme, who has presented proposals to end the war and to enable postwar reconstruction, says that, given political will, ''an end to the war could be quickly achieved.'' But he adds that ''as long as one of the two parties believes in the possibility of military victories, it will remain difficult to bridge the vast differences between Iran and Iraq.''
''We have come as far as any outside mediator can possibly come. We now need clear indications from both Iran and Iraq that they have the political will to resolve the conflict. It is now up to the two parties. No outside mediator can produce this political will.''
Meanwhile the fighting goes on, especially in Iran's southern oil producing province of Khuzistan. So far it has cost at least 50,000 lives and an estimated 200,000 wounded.
Iraq is unwilling to soften its claim on sovereignty of the Shatt al Arab waterway or to withdraw its troops from Iranian soil prior to negotiations.
But, says Mr. Palme, Iran and Iraq ''no longer raise territorial demands.'' Nor is Baghdad afraid that Tehran will overthrow the government of President Saddam Hussein or vice versa.
Iran has won significant battles in the areas around Abadan, Bostan, and Qasr-e Shirin since last September. Iran now claims to have reconquered 60 percent of the territory originally occupied by Iraq.
Mr. Palme describes the tactics of the Iranian armed forces as ''large infantry attacks similar to those during World War I.'' And on several occasions they have managed to cross into Iraqi territory. But Iranian officials stressed in their conversations with Mr. Palme that their armed forces quickly withdrew from occupied Iraqi land in an effort to demonstrate the absence of Iranian territorial demands.
In the last month the tide on the battlefield appears to have changed. Iraq for the first time in 10 months launched a counteroffensive in early February, regaining areas near Bostan. Iraq's armed forces then held off an Iranian military offensive intended to commemorate the third anniversary of the Iranian revolution. This battle, which left at least 4,000 dead, ''may have somewhat bleakened Iran's military optimism,'' say sources close to the mediation efforts.