CAIRO, AUG. 10 -- Arab leaders agreed during a stormy meeting tonight to send an Arab military force to Saudi Arabia and other Persian Gulf states to protect them from possible Iraqi attack.

The decision by a majority of the 21-member Arab League at a summit here was a sharp rebuff to Iraqi President Saddam Hussein. Just hours earlier Saddam had called for Arab masses to rise up against pro-Western Arab leaders whom he accused of blaspheming Islam by opening the door to a Western presence in the seat of Islam's holiest shrines. Saddam also exhorted Arabs to wage a holy war against U.S. troops in Saudi Arabia.

"Oh Arabs, Oh Moslems and faithful everywhere, this is your day to rise and defend Mecca, which is captured by the spears of the Americans and the Zionists," Saddam said in a statement broadcast from Baghdad. "Burn the soil under the feet of the aggressors and invaders."

The Arab leaders, most of them heads of government, endorsed a resolution that condemned Iraq's annexation of Kuwait, denounced the Iraqi military buildup on the border with Saudi Arabia and insisted on the return to power of the emirate's legitimate ruler. They also reaffirmed a resolution by their foreign ministers on Aug. 3 condemning the invasion.

The official Iraqi news agency immediately condemned the resolution, saying that it "implemented the American will."

The delegations disclosed no details of the size or composition of the proposed force, but summit sources said that even if it was only a token force, as expected, it would send a signal to the Iraqi leader that he faces the wrath of the majority of his Arab brethren as a result of his bellicose actions in the last week.

In Washington, U.S. officials said an Egyptian contingent of ground troops, estimated at 5,000 men, was already on its way to Saudi Arabia.

The resolution, a serious setback for Saddam, puts the heart of the Arab world -- Egypt, Syria, Saudi Arabia and the rest of the oil-rich Persian Gulf states -- on record in support of the escalating international campaign to reverse Iraq's invasion of Kuwait Aug. 2. Pressed to choose between the conservative monarchy in Riyadh and the radical regime in Baghdad, the Arab leaders opted for Riyadh.

The Arab League move was applauded by Saudi Arabia's ambassador to Washington, Prince Bandar bin Sultan. "Bingo!" he said during an interview with The Washington Post, when shown a news story summarizing the Arab League action.

The bitter meeting in Cairo dramatically illustrated the state of disarray in the Arab world since Iraq's invasion, the first occupation of one modern Arab nation by another.

Twelve of the 20 Arab League members present voted for the resolution, sponsored by the conservative six-nation Gulf Cooperation Council, according to Egyptian diplomat and commentator Tahseen Bashir.

Iraq, Libya and the Palestine Liberation Organization voted against the resolution, while Yemen and Algeria abstained. Jordan, Sudan and Mauritania were reported to have expressed reservations but taken no position. Tunisia was not present.

Raising the stakes in the volatile crisis, Saddam also threatened the stability of the Arab leaders' own countries by exhorting Moslem militants to rise up and overthrow "corrupt" Arab leaders who condemned the Iraqi invasion and implicitly supported U.S. military intervention.

Reacting to Saddam's declaration of holy war and the summit's decision, Bashir, widely regarded as an unofficial spokesman for the government, said: "The battle has been joined by Arab moderates who accept international legitimacy and those who exploit the frustration and humiliation of Arabs by offering far more than they can deliver."

He was referring to Saddam's promise that he will force the collapse of the oil-rich gulf monarchies and redistribute their enormous riches to impoverished Arabs throughout the Middle East.

Bashir said he expected the Arab force would be relatively small in size -- "a few thousand" troops -- but rich in symbolism.

"The issue is not to allow anyone to use Islam and alleged imperialism as a screen for his own ambitions," Bashir said in a telephone interview. Saddam "has scratched the Arab wound, and by rejecting the Arab force, he does not answer by healing the wounds. The battle is now over the Arab masses."

The Arab leaders ended a second closed-session of their emergency summit tonight amid angry words between the Iraqi and Saudi delegates and a walkout by the deposed emir of Kuwait, Sheik Jabir Ahmed Sabah.

No official reason was given for Sabah's abrupt departure from Cairo in a Kuwaiti jet as Egyptian President Hosni Mubarak struggled to save the summit from collapsing in discord. However, summit sources said the walkout resulted from a series of angry exchanges with the Iraqi delegates which later were interupted when Kuwait's foreign minister, Sabah Ahmed Sabah, collapsed and lost consciousness.

Egypt's official Middle East News Agency reported there was also a heated argument between Saudi Prince Saud Faisal and Iraqi Foreign Minister Tariq Aziz during a break in a foreign ministers' meeting separate from the summit session.

The resolution agreeing to send Arab troops to Saudi Arabia was an abrupt turnabout for Mubarak. Wednesday the Egyptian leader called for the formation of a pan-Arab security force to go to Kuwait to supervise the withdrawal of Iraqi troops if a peace plan is negotiated, but he said he would not send Egyptian troops to Saudi Arabia to back U.S. and Saudi forces.

Throughout the week, senior Egyptian officials have repeatedly said that Egypt was adamantly opposed to sending its troops to Saudi Arabia and risk being branded in the Arab world as a collaborator in a foreign imperialist military adventure.

Summit sources said the decision to make public the draft resolution supporting a multinational Arab force in Saudi Arabia and other gulf states was made in response to Saddam's call for a holy war against foreign troops and what he called "corrupt" Arab leaders.

Conservative Arab delegates appeared to be shaken by Saddam's vituperative address, which was broadcast by Iraqi television and radio and which exhorted the "Moslem masses" to rise up not only against the fast-growing contingent of U.S. troops in Saudi Arabia, but against the leadership of Egypt, Saudi Arabia and oil-rich kingdoms in the gulf.

Without mentioning Saudi Arabia's King Fahd by name, Saddam urged the overthrow of "corrupt" Arab leaders who defiled Mecca, Islam's holiest shrine, by allowing "infidel" American troops in Saudi Arabia.

Constitutionally, Iraq is a secular state, and Saddam's ruling Baath party, founded by a Christian, traditionally has kept religion out of policy-making.

Referring to Thursday's passage of the U.S. aircraft carrier Eisenhower through the Suez Canal and Mubarak's approval of U.S. military overflights, Saddam declared, "To our brothers in Egypt . . . it is your day to prevent the foreigner and his fleets from passing through the skies of Egypt and the Suez."

Saddam's appeal seemed certain to strike a responsive chord with many ordinary Arabs who, unlike their leaders, have openly sided with Saddam because of deep-seated resentment of the lavish lifestyle and perceived arrogance of the rulers of the tiny, oil-rich gulf sheikdoms.

Today in Amman, Jordan, about 7,000 Moslem militants declared holy war on the United States and urged Jordan to send volunteers to fight for Iraq. More than 40,000 Jordanians have volunteered to fight against the U.S. forces if war erupts in the gulf, a pro-Baghdad group said today.

In Tunis, the Islamic fundamentalist movement Nahdha declared that the U.S. troops in Saudi Arabia have profaned Moslem holy places. Militant Moslems also rallied in the Israeli-occupied West Bank and in the Yemeni capital of Sanaa.