A Soviet spokesman accused the United States today of aggravating tensions in the Middle East with a policy of confrontation against Libya.

At a press conference, Foreign Ministry spokesman Vladimir Lomeiko backed Tripoli's claims that it had nothing to do with recent terrorist attacks in Rome and Vienna, and said Washington was using these as a pretext to "punish" Libya.

"The anti-Libyan hysteria is groundless," Lomeiko said. He called U.S. threats of retaliation against Libya typical of a new kind of imperialism -- or "neoglobalism" -- that excuses interference in internal affairs, "international arbitrariness and violence," and anti-Sovietism.

In defending Libya, Moscow is standing by one of its oldest allies in the region. But Lomeiko would not say what Moscow would do in the event of any action against Libya.

"We hope there won't be any aggression, although there are many indications that it is coming to this," he said, noting later the positioning of U.S. ships near Libya.

Despite the harsh attacks on U.S. policy, Lomeiko said the "spirit of Geneva" was not in doubt, although in a prepared statement he accused groups in the United States of "mounting an attack on its effects."

"It is symptomatic that outbursts of 'regional preoccupation' in Washington always coincide with those periods when opportunities appear in relations between the U.S.S.R. and U.S.A. to reach agreement on measures concerning the central issues of lessening the war threat," he said.

Since the Geneva summit meeting between President Reagan and Soviet leader Mikhail Gorbachev, official Soviet statements have shifted back and forth from upbeat signals such as the exchanges of New Year's greetings to hard-hitting attacks on policy issues.

Today Lomeiko again put the blame for renewed U.S. imperialistic ambitions on certain "ruling circles," specifically naming the Pentagon and Rep. Jack Kemp (R-N.Y.).

Lomeiko said "neoglobalism" -- a term that has cropped up in the Soviet vocabulary in recent weeks -- was behind the blacklisting of states that "do not choose friends on Washington's bidding."

The United States "mounts blockades of those states, threatens them with aggression and openly plans to remove their leaders," he said, citing "new open threats" to Libya, Syria and Nicaragua.

Lomeiko said Moscow favored taking "all necessary steps" to settle regional problems peacefully, but "Washington is not interested in getting problems solved. . . . They do not want to talk with others."