Moslem leaders from 37 nations and the Palestine Liberation Organization last night formally approved a resolution expanding the Arab economic boycott against Israel to all members of their Islamic Conference and vowed to sever diplomatic relations with any country recognizing Jerusalem as the Israeli capitol.

Winding up a four-day summit, the conference also issued what it called the Mecca Declaration asserting that the "prime Islamic cause of this generation" shall be preparing for a jihad, or holy war, "with all the means at our disposal" to liberate East Jerusalem and all Israeli-occupied Arab lands.

The leaders also set in motion a new high-level mediation effort to end the four-month-old war between Iran and Iraq and passed a resolution on Afghanistan that avoided a tough condemnation of the Soviet Union in order to facilitate negotiations for the withdrawl of Soviet troops there.

There was conflicting reports whether the conference rejected a joint Syrian-Palestinian proposal calling on the United Nations to "freeze" Israel's membership in the United Nations. However, it set up a new office within the Islamic Conference organization to enforce an expanded trade and economic boycott using the same list of companies trading with Israel as used in the Arab League boycott, conference sources said.

Altogether, it appeared that the conference avoided taking too extreme a position toward Israel even while seeking to step up economic and diplomatic pressure on it and its supporters. Observers noted that the notion of jihad as a military holy war had been seriously diluted and redefined to mean a general mobilization of Islamic nations' overall resources for a long-term struggle.

While the various resolutions still had not been published by early this morning, most were reported simply to have repeated, well-known Arab positions on Jerusalem and the Palestinian issue.

Just how much additional Arab pressure will be forthcoming will depend on the attitude of the 18 African and Asian countries now pledged in theory to enforce the Arab boycott. The conference's resolutions are not technically binding on its members, and even some Arab countries have not respected their own boycotts.

Earlier yesterday at a special session the conference heard Iraqi President Saddam Hussein present in great detail his country's case against Iran. He ended with an offer to "restore the Iranian lands occupied [by Iraq] in the war," except for his nation's "legitimate national rights" over the entire Shatt-al-Arab waterway and several small pieces of borderland.

This appeared to put an end to speculation -- spurred by comments of several Iraqi ministers -- that Iraq was claiming rights to parts of Iran's oil-rich Khuzistan Province in addition to the strategic waterway separating the two countries.

Since Iran has refused to attend the summit, the Moslem leaders gathered here have been unable to make any progress toward settling the war. They established, however, a seven-member delegation of heads of state to purse the Islamic Conference's ongoing efforts to arrange a negotiated solution to the war.

On Afghanistan, the conference seemed to have sought a middle road between the pro-Soviet Arab members such as Syria and South Yemen, which seek recognition of the Babrak Karmal government, and the more conservative ones that advocate greater support for the Afghan rebels fighting to overthrow it.

The resolution reportedly expresses only "serious concern" over the continuation of "Soviet armed intervention" and renewed the conference's demand for the "immediate and total withdrawl of all foreign troops" from Afghanistan without specifically naming the Soviet Union.

As Pakistani Foreign Minister Agha Shahi told reporters here, "If you want to sit down for a dialogue, you don't start by condemning them [the Soviets."]

The resolution also calls on all parties to cooperate with U.N. Secretary-General Kurt Waldheim and his special representative in their efforts to get talks underway between the Babrak government and neighboring countries.

Spokesmen for the Afghan rebels here said they were happy with the expression of "full solidarity" for their cause stated in the Mecca Declaration and the warm reception given them by the conference, including their first occasion to address the Moslem leaders.

Altogether, the third summit of Islamic leaders, the largest ever, was devoid of the inter-Arab acrimony that afflicted the summit of Arab states held in Amman, Jordan in November. But conference efforts failed to mend the ongoing feuds between Syria and Iraq on the one hand and Jordan and Syria on the other.