Determined to prevent extremist violence from spreading to a largely disaffected populace, the government of President Hafez Assad is pressing ahead with a mild political and economic liberalization while it tries to tighten internal security.

The continuing political violence, which the government blames on Moslem religious fanatics, has prompted comparisons with the unrest that preceded the fall of the shah of Iran.

Civil disturbances between rival religious groups also have raised fears that Syria could become infected with the kind of strife that has plagued neighboring Lebanon for the past five years.

While the violence and unrest are serious problems, however, both Syrian and foreign political observers here generally agree that the opposition poses no immediate danger of bringing down the Assad government.

President Assad, 52, remains firmly in control of the military, and his armed opponents so far show no sign of being able to incite any mass uprising against the regime.

The greater danger, observers believe, is that failure to halt the extremists' campaign of assassinations and political terrorism could eventually force the army or others in the ruling Arab Baath Socialist Party to stage a coup against Assad.

To head off that possibility -- however remote -- and to stem the growing popular disaffection, Assad last month installed a number of new faces in his government, ordered the release of more than a hundred leftist political prisoners, gave substantial pay raises to employees of Syria's large public sector and instituted new measures to root out official corruption, curb inflation and improve government efficiency.

The new anticorruption drive was greeted with skepticism by observers who recall the failure of a similar effort two years ago.

Moreover there has been no move to address a grievance that increasingly preoccupies many Syrians: the domination of the country by the minority Alawite Moslem sect, a clannish group whose most prominent member is Assad.

"This country is not run by a government. It's run by a tribe," said one dissident Syrian doctor who is equally critical of the opposition violence. "We don't have a serious government, and we don't have a serious opposition either."

While the government readily acknowledges its economic problems and pledges to act against corruption, it is loath to admit the existence of political grievances in general and resentment of the Alawites' predominance in particular.

The Alawites, who make up an estimated 8 percent of the population, formerly were considered the servant class of Syrian society. But as poor Alawites increasingly joined the Army and rose through its ranks over the years, they acquired the means to turn the tables on then Sunni Moslem majority. When Assad, then defense minister and air force commander, staged a bloodless coup in 1970, he installed fellow Alawites in key positions.

Among the most feared and hated by many is his younger brother, Rifaat Assad, who commands the Syrian special forces known as the Defense Brigades.

Asked in an interview about popular resentment of domination by Alawites and the military, Information Minister Ahmed Iskandar, Ahmed asserted that the problem had been created by the Western press "to distort the reputation of Syria."

Ahmed, an Alawite who retained his post in the recent government reshuffle, declared to three American reporters. "The regime in Syria is the strongest regime inside the Arab homeland. No other regime has as wide a popular base as Syria." In his long answer to the question, Ahmed did not once mention the word Alawite.

Other key Assad loyalists who retained their posts included Defense Minister Mustafa Tlas and Foreign Minister Abdel-Halim Khaddam. Gen. Ali Haidar, an Alawite close to Assad, also kept his position as a top division commander.

Replaced in last month's shuffle were 14 high officials including the prime minister and the house speaker. A new 37-member Cabinet includes 23 members who had not previously held ministeral positions.

Although there was no public explanation for the changes, observers generally attributed them to complaints about official misconduct and inefficiency.

Most of the new Cabinet members are technocrats who apparently were chosen to reform their ministries and improve the government's image. The new prime minister, Abel Raouf Kasm, 47, holds a doctorate in architecture from the university of Geneva and has a reputation for honesty.

The information of the new Cabinet followed a two-week Baath Party congress, which debated the country's problems with remarkable candor, diplomats said.

The congress elected a new 21-member party politburo under Assad and formed a 75-member party central committee and a five-man inspection and control commission. The latter is charged with policing the government and the party to prevent influence-peddling and bribery..

The new government has privately shown some receptiveness to complaints by liberal dissidents.

When a lawyers' syndicate -- joined by unions of doctors, engineers and other professionals -- threatened last month to strike in support of their demands for an end to arbitrary arrests and for restrictions on the powers of military courts, the government negotiated with the group and won an agreement to postpone the strike for two months to give authorities time to introduce changes.

According to a leading dissident, Kasm told the group that if the changes were not made, he would strike too. In the meantime, some political prisoners were released.

While authorities try to placate liberal Syrians, however, security forces have been cracking down on Moslem extremists. Hundreds of suspected members of the outlawed Moslem Brotherhood, said to be the most active armed opposition group, reportedly have been arrested in recent weeks, and there have been unconfirmed reports that some were killed in prison.

While the government has blamed the Moslem Brotherhood for almost all terrorist actions in the country -- including the massacre in Aleppo last June of about 70 Alawite military cadets, the slaying of three Soviet advisers in recent weeks and the assassination Feb. 2 of a progovernment Moslem preacher -- the Brotherhood's actual strength, its capabilities and the extent of its popular support are far from clear.

According to Syrian and foreign sources, authorities use the name Moslem Brotherhood as a catch-all for any antigovernment guerrillas, some of whom may belong to communist or disaffected Baathist groups. Well-informed Syrians say they include a radical leftist group whose Arabic name means Red Brigades and two Moslem parties called the Youth of Mohammed and the Islamic Liberation Party.

In nearly two years of sporadic assassinations, sources here estimate, the guerrillas have killed 50 to 100 persons apart from the 70 cadets gunned down in Aleppo. The most prominent victims have been the dean of Damascus University and two generals. So far the guerrillas have not succeeded in assassinating any top-level government official.

Although the assassins lately have become increasingly bold, the victims continue to be largely minor figures.

In one recent incident, for example, a Christian employee in the presidency was seated in a bus when a man walked up to him and asked him his name. When the employee answered, the man pulled out a gun, shot him to death and calmly walked off the bus.

"The security forces can't find anybody willing to testify," a diplomat said. Potential witnesses fear they mihgt be signed out for vengence.