Jerusalem police, alerted in advance, last night broke up what they described as a well-organized attempt by orthodox and militantly nationalistic Jews to take over and establish a "settlement" on the Temple Mount, a site holy to both Jews and Moslems in Jerusalem's Old City.

Police arrested 45 people in a roundup in the Old City, later releasing four of them after determining they were not involved.

The others remained in custody today and will be brought before a judge Saturday night for an extension of their jail terms until being brought to trial.

Local officials, including Jerusalem Mayor Teddy Kollek, condemned the takeover attempt and worked frantically this morning to prevent a feared violent Arab reaction as the news of the incident spread.

They appeared to have been successful as there were no reports of serious disturbances in Arab East Jerusalem today, although security forces fired into the air to break up a small crowd of stone-throwing Arabs tonight. Israeli radio said three Arabs were detained.

The incident, however, was thought likely to increase tension in Jerusalem and the occupied West Bank, where there have been numerous clashes recently between Palestinians and Jewish settlers.

Police officials said some of those arrested included followers of Rabbi Meir Kahane, an American-born Jew and founder of the extremist Jewish Defense League, who advocates the forcible expulsion of the Arabs from the West Bank, Gaza Strip and Israel.

They also included residents of Qiryat Arba, a militantly nationalistic Jewish settlement near the West Bank Arab city of Hebron, and some Israeli soldiers who were not in uniform.

Some of those arrested, including the soldiers, were armed with automatic weapons in preparation for the takeover attempt, police said.

The Temple Mount, located in the eastern section of the Old City, is a center of Jerusalem's underlying religious and nationalistic tension. It is the site of the ancient Jewish temple of King David as well as two mosques--the Dome of the Rock and Al Aqsa.

The Dome of the Rock, also known as the Mosque of Omar, shelters a sacred outcropping of rock from which the prophet Mohammed, according to Islamic belief, ascended to heaven, and upon which, according to the Old Testament, Abraham prepared to sacrifice Isaac. The site is Islam's third holiest, after Mecca and Medina.

Last Easter, the Temple Mount was the scene of a wild shooting spree by Alan Harry Goodman, a Jew from Baltimore who emigrated to Israel in 1980. Armed with an M16 assault rifle, Goodman shot his way into the Dome of the Rock Mosque, killing two Arab guards and seriously wounding seven other people.

The shooting touched off a wave of disturbances in the West Bank and Gaza Strip. The memory of that violence heightened the concern of officials after last night's incident.

Kollek, who was reportedly enraged by the attempt to establish a Jewish settlement at the site of the Moslem holy places, called the takeover plot an extremely serious attempt to disrupt the fragile religious and social fabric of Jerusalem, which was divided between Israeli and Arab control from 1948 until the 1967 war, when East Jerusalem, including the Old City, was captured by Israel.

Police did not say how they learned of the takeover attempt, but they said they knew about it well in advance and had large numbers of security forces in place around the Temple Mount when it began to unfold about 11 p.m. yesterday.

About 10 Jewish youths were arrested initially, reportedly near the entrance to a blocked passageway through which they apparently hoped to tunnel to reach the Temple Mount. Most of the others were rounded up at the Old City home of Rabbi Israel Ariel, a Kahane ally who was the rabbi of Yamit, the last bitter holdout Jewish settlement in the Sinai, which was returned to Egypt last year under the terms of the Egyptian-Israeli peace treaty.

Kahane, who is in New York, was quoted by Israeli radio as saying he had no advance knowledge of last night's move on the Temple Mount but that he "welcomed" it.

Kahane's followers have been coming into growing conflict with Israeli authorities because of their increasingly militant tactics toward the Palestinians. Several of them were recently detained by police in connection with instances of shooting at Arabs in the Hebron area.

Despite the concern over the activities of Kahane's movement here in Israel, Interior Minister Yosef Burg said today that he opposed any suggestions that it or any other political group be outlawed in the country.