The Soviet Union and Iran signed a protocol for "accelerated" economic and technical cooperation today in a move that symbolized a significant improvement in their relations.

The document's signing climaxed a week-long visit here by Iranian Energy Minister Hasan Ghafurifarad. He told a news conference that his government regarded the Soviet Union as a "friendly country" and that his visit had laid "the basis" for "greater cooperation" between them.

The U.S.-educated Ghafurifarad was the first Iranian Cabinet official to visit here since his predecessor came to Moscow shortly after the overthrow of the shah of Iran in 1979. Relations between the two countries have been tense almost since the birth of the Islamic republic and worsened due to the Soviet invasion of Afghanistan, which borders both countries.

The Soviets have sought to cultivate a new relationship with the Tehran government by skirting political differences and focusing instead on economic ties. Largely as a result of their isolation from the West, the Iranians have increasingly turned to Moscow for new technology, bringing bilateral trade last year to a record $1.2 billion, about 30 percent higher than in 1978, the last year of the shah's regime.

According to official Soviet figures, Moscow bought 16 million barrels of Iranian oil last year. That amount helped offset the problems Iran reportedly has had in selling its oil to finance its war against Iraq during a time of falling world oil prices.

Ghafurifarad said today that the new protocol covered an accelerated completion of two large Soviet projects in Iran, and he said that an unspecified number of Soviet experts would soon arrive there to help expedite the work.

The projects are two gas-powered electricity plants--a 1,360-megawatt station at Awhaz and an 800-megawatt plant at Isfahan. The projects had been contracted by the former shah's government but were largely incomplete at the time of his overthrow.

Ghafurifarad said the two countries also expect to reach a final agreement soon on the joint construction of a large dam on the border river of Arras. The project at Khoda-Araraf would be similar to a nearby joint facility that generates 200 megawatts of electricity and supplies water to farms in both countries.

The government newspaper Izvestia pointed out that the Soviet Union was involved in 153 joint ventures in Iran, of which 104 have been completed. It also pointed to bilateral rail, sea and truck accords permitting Iran to circumvent the American blockade of its Persian Gulf ports.

According to Izvestia, Iran has shipped more than 3.4 million tons of goods using Soviet land and sea transit rights during the past year, a sharp increase over previous years.

Cooperation between the Soviet Union and Iran, Izvestia said, is "an objective necessity stemming not only from the geographic proximity of our two countries but also because it mutually complements economic interests of both countries."

Despite ideological differences, Ghafurifarad said, Iran and the Soviet Union maintain a friendly relationship: "We do not interfere in their internal affairs and they do not interfere in ours." The question of Afghanistan was not raised in the talks, he said.

Ghafurifarad said the Iranian government has sent 20 other delegations to "friendly" countries ranging from India, Pakistan and Turkey to North Korea. The visits coincide with the third anniversary of the Iranian revolution and are apparently designed to drum up diplomatic and economic support for the embattled Islamic regime.

He said the question of the Iranian-Iraqi war had not come up in his discussions with Soviet officials. The Soviets appear to have adopted a posture of strict neutrality in the conflict despite a longstanding friendship and cooperation treaty with Iraq.