The six conservative Arab states of the Persian Gulf have begun a mediation effort to end the 31-month-old war between Iran and Iraq amid signs that Iran finally is willing to discuss a settlement seriously.

The six, led by Saudi Arabia and grouped within the Gulf Cooperation Council, have presented a new plan that includes a "reconstruction fund" to finance war reparations. The fund appears to meet one of Iran's principal demands for a halt in the hostilities.

The plan also calls for a withdrawal of both armies to the borderlines stipulated in a 1975 accord between the two warring nations known as the "Algiers Agreement." In addition, it provides for exchange of tens of thousands of prisoners.

The plan has been presented to Tehran by a two-man delegation from the council led by Kuwaiti Foreign Minister Sabah Ahmad. The other council members, besides Saudi Arabia, are Bahrain, the United Arab Emirates, Qatar and Oman.

After a meeting of the council's foreign ministers here last night, a spokesman said that the delegation had received an "encouraging response" from both Baghdad and Tehran and that the mediation effort would continue at the request of both countries.

Arab analysts here saw a major shift in Iran's attitude just in the acceptance of a mediation bid by the Arab gulf states, because Tehran long has attacked them for their considerable financial and logistical support to Iraq since the onset of the war in September 1980.

The analysts also noted other bits of evidence that Iran may be inching toward the negotiating table, including the presence now of Algerian Prime Minister Mohammed Abdulghani in Tehran for talks about a war settlement and the lack of any major Iranian offensive in many months.

Algeria mediated the earlier border dispute between Iran and Iraq, which led to the 1975 agreement ending the Iranian-backed Kurdish rebellion in northern Iraq and fixing the border through the strategic Shatt al Arab waterway largely in favor of Iran.

Abdulghani is the highest Algerian official to have visited Tehran, further suggesting that there is some possibility of movement in the so far fruitless search for negotiated settlement.

The gulf council mediation bid stems from an effort to find a solution to a huge oil slick polluting gulf waters. The slick is the result of an Iraqi attack on Iran's offshore Noruz oilfield in early March and accidental damage inflicted by a passing ship on another Iranian well in late January. About 7,000 barrels of oil are estimated to be leaking daily from three or four wells.

Iran has refused to accept a local cease-fire to allow the leaking wells to be capped, apparently fearing that the problem of the oil slick would be linked to the larger question of an overall war settlement. Some western and Arab analysts believe Iraq intended to force some kind of negotiations when it attacked the Iranian oil wells, although the Iraqis say that their target was an Iranian ship that had entered the war zone rather than the oil platform itself.

Iraq, after its invasion force suffered a string of setbacks in Iranian territory a year ago, appealed for a cease-fire in June and said it was pulling virtually all of its troops out of Iran. Since then, it has beaten back several Iranian attempts to invade Iraq, including a major offensive aimed at the gulf port of Basra in July.

The three main Iranian conditions for an end to the war have been the withdrawal of all Iraqi forces from Iranian territory, "punishment" of Iraqi President Saddam Hussein for invading Iran and "war reparations" for the damage inflicted by Iraqi forces on Iranian industrial and civilian targets. The Iranians have slowly softened their demand for the punishment of the Iraqi leader but still are sticking to the other two.

Earlier this month the Iranian news agency published a government statement saying Iran was now seeking $90 billion in war reparations, roughly one-third of it for damage inflicted on its oil industry.

Details of the proposed "reconstruction fund" envisaged by the gulf council have yet to be announced, but local press reports say it would be a multibillion-dollar international one offered to both sides and to which all members of the Organization of Petroleum Exporting Countries and multinational lending institutions would be asked to contribute. Both Iran and Iraq belong to OPEC.

Even if Iran accepts such a fund, there remains the complicated issue of the border demarcation between the two countries.

Iraq is understood to be ready to accept now the lines drawn by the 1975 Algiers Agreement, which it repudiated before the start of the war, but Iran's position is not clear.

While the former shah of Iran signed the Algiers Agreement, he never actually withdrew Iranian forces from all the territory that it theoretically ceded to Iraq. Iran still is fighting to recover several bulges and slivers of land that it considers its own but that are occupied by Iraqi forces.

Thus the issue of what constitutes the 1975 border is far from settled and could still upset the latest mediation efforts by both Algeria and the Arab gulf states.