A Soviet Foreign Ministry spokesman indicated today that Moscow was willing to "exert influence" to ease the hostage crisis in Beirut.

Answering questions about the captive TWA passengers in Lebanon, Vladimir Lomeiko said in such cases, the Soviet Union "has done and will do all that is possible to contribute to the solution of all crises."

"We oppose terrorism , we condemn such methods and wherever possible, exert our influence to resolve crises," he said.

Lomeiko offered no specifics on the Beirut case, but the subject undoubtedly came up during talks here last week between Soviet leader Mikhail Gorbachev and Syrian President Hafez Assad.

Assad, Moscow's main ally in the Middle East, was here on a working visit and held his first meeting with the new Soviet leader since Gorbachev took office in March.

Diplomats here have speculated that Moscow would like to see the Beirut crisis contained, in part to avoid attracting a greater U.S. military presence to the region.

As the hostage situation has unfolded, the Soviet press has focused on U.S. naval deployments off the Lebanese coast, which it has warned could be a prelude to further intervention in the region.

Lomeiko today reiterated Soviet condemnation of terrorist acts, but he noted that terrorism "is not created from nothing," criticizing Israel and "those who back it" for creating an "atmosphere of violence" in the Middle East.

The criticism appeared directed at Washington.

"What people don't realize is that victims of such actions cause counter reaction," he said. ". . .when killing others, one cannot weep only over one's own, those who have become the victims of retaliatory actions."

In a separate interview with Greek journalists later, Lomeiko criticized the United States for its reaction to lapses in security at the Athens airport where hijackers boarded the TWA plane.

He described Washington as "seizing an available opportunity to express displeasure" with the government of Greek Prime Minister Andreas Papandreou, which has been critical of U.S. policies.

"Washington obviously reacted as a result of mounting irritation with the wayward Greeks. It obviously has to do with the fact that the Greek government raised questionsthat are inconvenient," Lomeiko told the journalists.