A group of armed men took over the Great Mosque in Mecca early yesterday and seized a number of hostages, the Saudi Interior Ministry said today.

Breaking a day-long official Saudi silence on the incident, the ministry said "a band of renegades to the Islamic religion," invaded the mosque, Islam's holiest shrine, during dawn prayers Tuesday and tried to force the worshipers present to accept one of the attackers as the Islamic messiah.

The Interior Ministry statement left unclear whether the seizure of the mosque had in fact ended.

While the statement did not specify the nationality of the attackers or mention casualties, unconfirmed reports from other Arab sources indicated the invaders were followers of Iran's Ayatollah Ruhollah Khomeini and said the takeover resulted in casualties when the attackers clashed with Saudi authorities.

The Saudi statement said the attackers carred "weapons and ammunition." It said they presented one of their number as the messiah and "called on the Moslems in the Al Ahram [Great] Mosque to acknowledge him in this capacity under the threat of the arms they were carrying."

The statement added, "The authorities have taken all necessary measures and brought the situation under control. In accordance with a religious decree by all the Moslem clergymen, measures have been taken to protect the lives of the Moslems who are inside the Al Ahram mosque. The Interior Ministry will, God willing, issue a subsequent statement explaining the development of the situation."

The 24-hour delay before the statement was issued and its careful wording underscored the concern of Saudi authorities about violence in Islam's holiest shrine. The takeover followed a series of confrontations between Saudi authorities and Iranian Moslems of the Shiite sect during the recent annual pilgrimage to Mecca.

It was not immediately clear, however, whether the mosque takeover was carried out by Iranians or had any connection with the current occu- pation by Islamic militants of the U.S. Embassy in Tehran, an action that has greatly worried Saudi authorities because it was undertaken in the name of Islam and has the backing of Iran's Moslem leader, Ayatollah Ruhollah Khomeini.

Shortly after the mosque seizure, Saudi Arabia temporarily cut communications with the outside world as it struggled to deal with the crisis. Nevertheless, sketchy reports of the attack filtered out and communications were restored early this morning.

In a report from Tunis, the Los Angeles Times quoted a source close to Saudi Arabia's Crown Prince Fahd as saying 200 armed men invaded the Great Mosque and seized 150 hostages. The source, a Kuwaiti, said two Saudi policemen were killed in the attack. He said Prince Sultan, the Saudi defense minister, rushed from the royal capital at Riyadh to Mecca to deal with the emergency.

The news of what the State Department characterized as "disturbances" in Mecca sent tremors through the U.S. oil industry, which imports about 1.4 million barrels of crude a day, or about 24 percent of total U.S. crude imports, from Saudi Arabia.

News of the mosque takeover follows reports of incidents recently between Saudi security forces and Iranians making the prilgrimage to Mecca. Most Iranians adhere to the Shiite sect of Islam, which comprises the minority in the rest of the Moslem world.

Saudi Arabia, the birthplace of Islam, is controlled by orthodox adherents of the Sunni sect, the dominant religion in Arab countries.

An open conflict between members of the two sects could have grave consequences in many Middle Eastern countries, where religious and ethnic rivalries are never far from the surface, observers said.

The Kuwaiti newspaper Al Qabas quoted a Saudi source at the current Arab summit conference in Tunis as saying that a group of "hirelings" stormed a "building" in Mecca and took 90 persons hostage.

"The source said Crown Prince Fahd [Saudi Arabia's effective strongman who is attending the Tunis summit] has ordered security forces to hit these hirelings and liquidate them."

Other unnamed sources blamed the seizure on followers of Iran's Ayatollah Ruhollah Khomeini, who has encouraged the embassy takeover in Tehran. The Egyptian newspaper Al Akbar said the armed men "belonged to Khomeini's gangs, and said some persons has been killed in the incident, including an important Saudi clergyman.

The State Department said it was in telegraphic contact with the U.S. Embassy in the Red Sea port of Jeddiah, which is about 50 miles west of Mecca. But U.S. officials were reluctant to discuss the mosque incident.

The officials said they did not have a clear idea of what may be happening in Mecca; which is closed to nonMoslems, but they doubted that the incident was "very dramatic."

Earlier, Hodding Carter told reporters, "the objectives that have been ascribed to that group from my various sources range from those not unfamiliar to Americans who believe for religious reasons that the end of the world is at hand to those who are trying to make some point which is perhaps less religious than secular."

An independent Iranian newspaper published in Washington, the Iran Times, reported this week that according to Iranian pilgrims to Mecca, Saudi Arabian police recently entered a mosque and broke up a meeting of Iranians who had gathered to hear a speech by an Iranian clergyman, identified as Hojatolesiam Ghaffari.

The Iranians charged that several of their number were injured in the melee, the newspaper said. It said the pilgrims had earlier charged that Saudi authorities searched them upon their arrival at Jeddah airport and confiscated their Farsi-language commentaries on the Koran, the Moslem scriptures.

Authorities in Tehran have estimated that 50,000 Iranians this year have made the Mecca pilgrimage, called the Hajj. The authorities said that most Iranian pilgrims joined a march in Saudi Arabia last week to show their solidarity with Ayatollah Khomeini. The march was closely monitored by Saudi police, the Iran Times said.

The reported friction between Saudi authorities and visiting Iranians appears to reflect Saudi nervousness about recent speeches by Iranian clergymen calling on Shiites in Arab states along the Persian Gulf to rise against "oppressive" rulers.

In recent months, some influential Iranian clergymen in Khomeini's entourage have called for the export of Iran's revolution to neighboring Arab states. Representatives of Khomeini have been expelled from Kuwait, Bahrain and the United Arab Emirates after they were accused of stirring unrest against the ruling monarachies there.