TUNIS, OCT. 8 -- Two Moslem fundamentalists convicted of plotting against the government were hanged at dawn today as Tunisian President Habib Bourguiba ignored appeals for a pardon and threats of reprisals.

The Justice Ministry said Mehrez Boudegga, 25, and Boulbaba Dekhil, 24, were executed at the Tunis prison where they had been held. They were condemned to death Sept. 27 after a month-long trial of 90 fundamentalists, mostly members of the outlawed Islamic Tendency Movement.

All were accused of trying to topple Bourguiba's prowestern government and replace it with an Islamic state. Five others were sentenced to death, but they are among 37 accused who were tried in absentia.

Within hours of the verdict by a state security court, the Lebanon-based Islamic Jihad threatened to kill Tunisian leaders if the death sentences were carried out. The pro-Iranian Shiite Moslem group said it would consider any executions "a declaration of war . . . on Moslems throughout the world."

Similar threats from other pro-Iranian groups followed the warning from Islamic Jihad, which holds American and French hostages.

The five-member court said Boudegga made the bombs that exploded Aug. 2 at four resort hotels, injuring 12 European tourists and a Tunisian. The court said Dekhil threw acid in the face of a member of the governing Destourian Socialist Party.

The verdict, which spared the life of Islamic Tendency leader Rachid Ghannouchi, was widely regarded as moderate, reportedly the result of pressure from Tunisia's western allies and moderate Arab states that feared a backlash if dozens were sent to the gallows.

Ghannouchi was one of two persons sentenced to life in prison. Other sentences ranged from two to 20 years. Fourteen persons were acquitted.

The trial culminated a seven-month crackdown by the government on the movement, which espouses an Islamic state based on the precepts of the Moslem holy book.

Authorities have said 1,270 fundamentalists have been arrested since March, when Tunisia broke relations with Iran, saying Iranian diplomats here were working with local groups to try to topple the government.

The Islamic Tendency Movement, outlawed in 1981, is seeking recognition as Tunisia's fourth legal opposition party. The Destourian Socialist Party holds all 136 seats in the National Assembly.

Yesterday, the Tunisian League of Human Rights presented a petition signed by 330 Tunisian artists, professionals and labor union members asking Bourguiba to pardon the condemned men.

On Tuesday, a special court reviewing procedure upheld the verdicts, opening the way for the executions. The condemned had no possibility to appeal.

Countering charges of partiality, the government-controlled Tunisian press noted that the trial was open to journalists, family members of the accused and observers.