Sixty-three men were beheaded by sword in Saudi Arabia today for their part in an attack in November on the Grand Mosque in Mecca.

The beheadings, carried out at dawn in public parks in eight cities under a decree issued by King Khalid, were the largest mass execution in the 48-year history of Saudi Arabia.

The executions were scattered throughout the country, observers speculated, to expose as many people as possible to the judgement against the Moslem militants and to dispel suspicions that the attack on the mosque had weakened government authority.

The Interior Ministry also acknowledged that the death toll in the seizure of the mosque and its recapture by Saudi troops after two weeks of bitter fighting was twice that previously announced.

In all, 270 people were killed and more than 550 wounded, according to today's official report. The dead included 127 security forces, 117 rebels and 26 pilgrims who were in the mosque at the time of the takeover.

The seizure of the mosque, Islam's holiest site, on Nov. 20 by several hundred militants, under the leadership of a self-proclaimed messiah, shocked the Moslem world and brought great embarrassment to the royal rulers of Saudi Arabia.

It was accompanied by outbreaks and unrest in other Saudi cities that were quickly put down, and it was followed by wholesale reshuffling in the political and security leadership of Mecca and changes at high levels of the Saudi military.

The government announcement said the executions were in accordance with an edict issued by Saudi religious leaders specifying that under the Koran, the crime of spilling innocent blood in a mosque should be punished by death.

The 63 beheaded today were among 170 militants captured when Saudi forces retook the mosque.

The others, including 23 women and youths, were given various prison and "re-education center" terms following secret trials by a religious court, authorities said. Thirty-eight persons were found not guilty and released.

Those executed, the government said, included 41 Saudis, 6 South Yemenis, 10 Egyptians, 3 Kuwaitis and 1 each from Sudan, Iraq and North Yemen.

Fifteen of the executions were carried out in Mecca and smaller groups were killed in Riyadh, Medina, Damman, Bridah, Abha, Hayil and Tabouk.

Because of the early hour few Saudis actually saw the executions and they were not carried on the government-owned television.

Asked what the local reactions was, one Jeddah resident said: "People here tend to stay indoors at such times."

Arab diplomatic sources said guards attached to The governing princes of the eight cities served as the executioners. They used long steel swords, specially ornamented and sharpened to a razor's edge.

The sources said most of the men were beheaded with one swift blow. It is traditional to sew the head back onto the body for burial, they said.

King Khalid, whose family is the traditional guardian of the Islamic holy places in Mecca and Medina, told the Interior Ministry in a letter published today:

"After considering what you've presented to us from the confessions of the criminals who attacked the holy shrine and allowed weapons into it and closed its doors on the Moslems who were praying . . . and as long as they have all cofessed to their crimes, killing and corrupting in God's holy shrine . . . it is rightful now to kill them."

The decree said, "God almighty has ordered us to kill those who fought us at the . . . mosque and tried to revolt and to fragment us."

Those executed included Juhaiman Bin Seif, the military comander of the group. Its overall leader, Mohammed Bin Abdullah Qahtani, the self-proclaimed messiah, was killed during the two weeks of fighting.

Although most of the Saudis executed today were members of tribes with a reputation for political opposition, Crown Prince Fahd said in an interview published today that the mosque attack had "no political implications or internal overtones."

The interview, with the leftist Beirut newspaper As-Safir, quoted Fahd as saying, "The incident has not affected stability in the country. There is no doubt that the kingdom is proud of its stability and the strength of its government.

"What happened here could have happened anywhere else."

In another interview, Fahd said the royal government is planning a constitution and a consultative council to advise the current rulers, who are mostly members of the royal family.