The Soviet Union is pursuing all possible diplomatic contacts in the Middle East to secure the release of its three citizens held hostage in Beirut, diplomatic sources here said.

The main Soviet appeal has been to Syria, its principal ally in the region, but one western diplomat said, "All Arab states who can be of help have been contacted."

The kidnapings last Monday by a radical Moslem group and the subsequent assassination of one of four captive Soviets mark the first time the Soviet Union has been directly touched by Lebanon's political violence.

The crisis, a familiar one for the United States, has also put the Soviet Union in the new and frustrating position of having its citizens and its prestige attacked without being able to use its power to respond.

Diplomats here consider any form of military retaliation by the Soviets unlikely, particularly given the fluctuating character of the Lebanese political scene.

"How? Where? And against whom, considering in Lebanon, you don't know who's who?" asked one diplomat.

At a press conference in Paris yesterday, Soviet leader Mikhail Gorbachev dismissed any suggestion of Soviet helplessness in Lebanon, saying "the influence of the Soviet Union and other countries is tremendous."

But still, according to diplomats here, the Soviets privately concede that they lack experience in handling such situations, particularly as it affects their image as a world power.

"It is not something a superpower can take easily," said one expert.

Moscow's dilemma over the hostages comes at a time when, in some respects, the Soviet position in the Middle East is improving, partly as a result of its own efforts and partly because the United States lost ground last week when it gave initial support to Tuesday's Israeli raid on the Palestine Liberation Organization headquarters in Tunis.

The Soviet position in Lebanon is not likely to change as a result of the hostage situation, diplomats here said. In fact, the kidnapers' demand that Moscow force Syrian-backed militias out of Tripoli touches on what apparently has been a source of contention between the Soviets and the Syrians.

After the last visit here by Syrian President Hafez Assad, the wording of a public statement indicated that there had been differences between the two allies on Syria's role in Lebanon and its influence on factions within the PLO.

The Soviets have favored an "undivided Lebanon" and have pressed Assad not to get involved in Palestinian factional disputes.

In other areas of the Middle East, the Soviets recently achieved a diplomatic breakthrough in the Persian Gulf with the opening of diplomatic relations with Oman.

And yesterday in Paris Gorbachev seemed to indicate some flexibility on establishing relations with Israel, noting that when the situation in the Middle East returns to "normal" there will be no "obstacles" to Soviet-Israeli relations.

The hostage crisis has had little effect domestically since the government has released little information about the events in Beirut, in contrast to extensive coverage in the West of similar hostage situations.

The first report here on the kidnapings came on Tuesday, a day after the four Soviets were seized.

A day later, after Soviet diplomat Arkady Katkov was killed by the kidnapers, the Soviet government condemned what it called "an atrocity that cannot be pardoned." It mentioned the murder, but gave no names.

Since then the Soviet press has confined itself to terse reports of governments around the world, including the United States, condemning the kidnaping.

The Soviet statement Tuesday traced some of the responsibility for the kidnapings back to Israel, which it said has incited strife in Lebanon.