President Efrain Rios Montt, under severe pressure from disgruntled Army officers, swore in a special commission to oversee Guatemalan elections today, and his government announced that voting for a constituent assembly will take place July 29 next year.

The president inaugurated the Supreme Electoral Tribunal in televised ceremonies without reference to the coup threat Wednesday that led him to decree a "state of alarm," suspending civil liberties and dismissing six key officers as palace advisers.

The tribunal had been planned for some time, and the date for constituent assembly elections fell significantly short of demands by political parties for a swift presidential vote, the date for which still has not been fixed. Diplomatic and Guatemalan sources, nevertheless, concluded that Rios Montt had staved off the biggest challenge to his rule since fellow officers put him in power in March 1982.

"My assessment is that, for today, he has retained power," said Vinicio Cerezo, leader of the Christian Democratic Party and an advocate of early presidential elections.

Pressure for setting a presidential election timetable was a major factor in the confrontation between Rios Montt and a group of young Army officers during the past 10 days.

Just as important, knowledgeable sources said, was a growing feeling within Army ranks that the young officers around Rios Montt were using their power for financial gain and disrupting the military chain of command by ordering around senior officers.

Against this background, a group of officers from outside the ornate presidential palace confronted Rios Montt yesterday with a demand that he resign, Guatemalan political sources said. Troops in several barracks went on alert, they added, but after a day of tense negotiations the president announced his state of alarm and fired the six officers, who had drawn attention by driving fancy cars and living in luxurious homes.

In addition, Rios Montt agreed to open discussions next week with the country's six main political parties on their demands for an election schedule, the sources said.

Council of State President Jorge Serrano's announcement late last night of constituent assembly elections was seen as an added measure to defuse the crisis. After the elections next year, the constituent assembly will take office Sept. 15. The constitution it will write will lay the groundwork for presidential elections the following year, Serrano said.

Political observers pointed out that this differed little from Rios Montt's previous promises of constituent assembly elections and the turnover of power to an elected president in 1986.

In a speech at the tribunal's swearing-in, Rios Montt hailed the five-man board as an instrument to help restore democracy to Guatemala and overcome "our unsavory past" by guaranteeing "free and pure" elections, unlike past balloting notorious for fraud and violence. But he avoided setting a date for presidential elections.

In addition to being upset by the election timetable and signs of corruption, the nearly rebellious officers were concerned about Rios Montt's growing unpopularity with a number of Guatemalan groups.

Businessmen, teachers and Roman Catholic Church officials, in addition to political opponents, increasingly have come to resent the president's evangelical, preaching style of rule, which one source described as a "messianic" monologue.

This popular dissatisfaction was dramatized Tuesday night in television appearances by two opposition figures who called Rios Montt a traitor and suggested that he step down.

Guatemalan sources said tension remains high as opponents and dissident officers observe whether Rios Montt carries out the commitments he made. Although the dismissed officers helped to bring Rios Montt to power, political sources gave them little chance of returning to power.

This is particularly true because the coup that brought Rios Montt to power aimed to end the corruption that was rife under his predecessor, Romeo Lucas Garcia.

"The crisis is not over," Cerezo said. "The economic problems will go on. The political problems will go on."