Syrian President Hafez Assad's government has put down the most severe domestic threat of its 10-year rule but it seems to be having trouble reaching its stride again now that the violence of last year has subsided.

A visitor returning after a two-year absence finds old friends in an out of government more than a little morose. Sometimes they give the impression that earlier hopes have turned sour, that these are times for mere survival based on the armed forces and the police.

This is a good distance from the Syria of several years ago, when Assad -- at the head of a country whose economy was booming -- seemed to be emerging as a paramount Arab leader in the struggle against Israel, heard by radicals and moderates alike.

Now his government by its own light shas good reason to feel weary and wary.

At home, it has survived last spring's mass demonstrations bordering, at times, on armed insurrection. The opposition was blamed on Moslem Brotherhood fanatics out to unseat Assad and his Alawite Minority followers.

But the large-scale repression used to reassert Assad's authority and the assassinations attempt in June against the president have left a legacy of suspicion and doubt.

A now lackluster economy, dependent again on Arab donations, has contributed to a feeling that Syria is put upon and ill-served by its supposed friends.

Abroad, the Assad government feels dangerously isolated and almost trapped: with 22,000 troops bogged down in the Lebanon with the Arab peacekeeping force, on the outs with most of the Arab world, and all but despairing of salvation from the Reaganadministration.

Analysts are convinced the signature of a friendship treaty with the Soviet Union last fall was motivated essentially by frustration and a need for formal symbolism that such a pact entailed. Yet, when Syria moved troops to the Jordanian border in November the Soviet ambassador scurried around Damascus patently uninformed of the move despite treaty obligations for prior consultations.

Even Syria's embrace of revolutionary Iran -- basically motivated by anti-Iraqi emtions -- has its limits.

A Syrian official complained of the Iranian mullahs that "they all want to be Talleyrand, Napoleon, the prophet Mohammed and Aytollah Ruhollah Khomeini. They listen to no one in the outside world and indeed do not believe the outside world exists."

The irony of the basically lay Baath Party regime here being allied with Iran's Islamic Revolution has not escaped notice, especially since the government accuses its own fundamentalist right-wing Moslem Brotherhood of fomenting domestic disorders.

Seen in this light, Assad's recent visit to Romania was remarkable less for what happened in his apparently pro forma talks with President Nicolae Ceaucescu than for the fact it took place at all.

In the middle East, where assad once appeared a major and sure-footed leader of an emerging regional superpower, the regime has shown recent signs of erratic behavior.

The dispatch of troops to the Jordanian border was not the kind of reasoned, calculated decision that Henry Kissinger so admired during his shuttle diplomacy in and out of Damascus in 1974. And Syrian officials privately make no pretense in saying so.

The troop movement fooled no one, and Israel was no more willing in 1980 to allow Jordan to go under than it was in 1970 when Israel's warnings provided justification for Assad to maneuver his more belicose rivals out of power.

Nor has Syria avoided condemnation in the still mysterious disappearance earlier this month in Beirut of the Jordanian charge d'affaires who was kidnaped in a commando raid. Such is Syria's armed presence in Lebanon -- and its secret servic's reputation for rough-and-ready justice -- that Syria is automatically held responsible despite its protestations of innocence.

The regime's defenders reply that erratic behavior in the Middle East is no monopoly of Syria and, indeed, many observers have questioned King Hussein's wisdom in allying Jordan with Iraq as well as the latter country's invasion of Iran.

All three countries are run by minorities -- the Bedouin in Jordan, the Alawite sect in Syria and the Sunni Moslems in Iraq. Hence a measure of the disarray in official Syrian thinking these days is illustrated by a recent editorial in the government-controlled Syria Times denouncing Jordan as a "desert principality" in which "only a very small proportion of the population is beholden to arguments about the legitimacy" of the regime.

More worrying than the inability to see that such a description might apply dangerously close to home is President Assad's own isolation. His supporters make little secret of their desire to see him meet more Syrians from all walks of life, a practice he has all but abandoned in the past year except for conferring with his security aides.

"He's running the danger of getting out of touch with what people are saying and what is happening," an official said.

Assad also sees few diplomats and prefers instead to receive foreign statesmen. "the president still receives with his old calm, cordiality and penmindedness," an analyst said, "but those foreigners are not the people who can brainstorm with him about Syria's problems."

Grumbling, especially about official repression, at times has obscured the undoubted accomplishments of the regime in education, housing, roads industrialization and providing jobs.

"We are getting a reputation of being the enfant terrible of the Middle East," an official said, "as if we were responsible for all the region's problems."

He argued that the world, especially the West and the United States, needed a strong Syria to arrive at a just and comprehensive peace now, reflecting a commonly held view here and in many other Arab capitals that the Camp David formula has reached a dead end.

Yet Syria's own argumentation is often difficult for outsiders to credit as rational.

For example, Assad reportedly is convinced that King Hussein is determined to follow Egyptian President Anwar Sadat in seeking a separate peace with Israel at Syrian and Palestinian expense.

Asked why Jordan would make such a deal after refusing it in 1978, the official said: "That's what is tricky to show. There's nothing tangible, nothing concrete to convince you, but I promise the president has his good reasons."

Put more bluntly by Information Minister Ahmed Iskandar, the policy is simply: "There will be no Jerdanian option as long as Syria wields a stick over the regime of King Hussein."

The brief union with Libya last fall failed to produce the hoped-for largesse from Libyan oil coffers.

Despite the implacable rivalry between the rival Baath Party regimes in Baghdad and Damascus, officials here are convinced that Iraq scuttled unity plans in 1979 because it felt the Persian Gulf was more important than the Palestine issue.

"Had unity gone ahead with us, [Iraqi President] Saddam Hussein would have been obliged to direct his energies toward solving the Palestine problem," an official said. "By remaining aloof, he kept his hands free to pursue his dream to become the gulf strongman."