Egyptian President Anwar Sadat today announced stiff measures to put an end to sectarian violence between Moslems and Christians, including a surprise decision to revoke the government's recognition of Pope Shenouda III as patriarch of the Orthodox Coptic Church, one of the Islamic region's largest minority religions.

In a three-hour speech attacking both Moslem and Christian extremists as well as his political opponents, whom he accused of exploiting religious tensions, Sadat said that 1,500 persons had been arrested in the last three days and that all those who had played either a direct or an indirect role in causing the strife would be put on trial in open court.

"I am not going to be merciful to them or let them go," he said, according to an unofficial English translation of his speech given before a special joint session of parliament and the consultative council. "It is a question of the safety of Egypt and the reputation of Egypt."

Sadat spoke after carrying out the most sweeping crackdown on both the political opposition and religious extremists in Egypt since he came to power 11 years ago this month. The figure he gave of the number of persons arrested during the last three days, whom he said included 250 "criminals," was 400 more than had previously been reported in the semiofficial press here.

Among the other decisions he announced to halt the sectarian fighting, which has claimed at least 21 lives in the last three months, were decrees providing for the abolition of rightist fundamentalist Moslem groups shown to have been involved, seizure of the funds of such groups, and the transfer to new jobs of any professors, teachers or journalists found guilty of inciting the people.

Another decree submitted to parliament for approval covers the abolition of six religious and political magazines, including the main organ of the Moslem Brotherhood, Al Daawa, and of the official opposition Socialist Labor Party, Al Shaab.

Sadat also said he would hold a referendum within the next 60 days to have all these measures approved by the nation.

But by far the biggest surprise of his speech was his decision to cancel the 1971 government decree recognizing the appointment of Pope Shenouda III as the 117th patriarch of the Coptic Church, a group that goes back to earliest Christian days and claims about 20 million followers, mainly in Egypt and Ethiopia.

Sadat said he was forming a committee of five bishops to "undertake the papal duties in his place" and redirect the church toward its "traditional role." Whether this measure will be accepted by the church hierarchy or touch off a new struggle between the Coptic community and the state remains to be seen.

Sadat has had a longstanding feud with the pope, and tonight he indirectly implicated him in an incident of sectarian violence in 1972.

Although Sadat at several points criticized the conduct and leadership of the pope, the main thrust of his speech seemed to be directed instead at the Moslem Brotherhood and other independent extremist Islamic groups that he said were working together to incite Egypt's majority Moslem population to hatred and violence against both the Christians and his own regime.

He said that his government's past leniency toward them had been a mistake and that they had gone beyond the norms of acceptable criticism to "jeopardize the security of the country."

"They have to pay the price," he said. "I was wrong in being lenient with them."

Sadat accused the brotherhood and extremist Moslem groups, or societies, of working hand in hand and "traveling all over Egypt" to incite the people against the government, even to the point of using "exactly the same words" in their sermons and leaflets.

"This time we must have a radical solution," he said. "So we do not have time to waste."

With files and dossiers at hand, Sadat also tried to show that the leftist political parties opposed to his rule had been deeply involved in fomenting sectarian strife. He said they had tried "to ride the wave of religious extremism" for their own advancement and had even worked closely with the Moslem Brotherhood leaders for this purpose.

Despite his sharp attack on their criticism of his foreign and domestic policy, Sadat said he was not going to ask the parliament to dissolve either the Socialist Labor Party or the Union Progressive Socialist Party, two main legal leftist opposition groups.

He said a list of all those arrested was being published tonight so that no one could claim that there had been any disappearances. He promised that "everything will be in the open and nothing behind closed doors."