MOSCOW (AP) _ Iran's Parliament speaker, Hashemi Rafsanjani, will visit the Soviet Union this week at the invitation of President Mikhail S. Gorbachev, the Tass news agency said Sunday.

Tass did not say how long Rafsanjani would stay in Moscow or with whom he would met.

Iran's state-run television said a 35-member Iranian delegation had gone to Moscow to prepare for the visit, which begins Tuesday.

It quoted the delegation's leader, Economy and Finance Minister Mohammad Javad Iravani, as saying a long-term industrial and economic cooperation agreement will be signed with the Soviet Union during the visit.

Tentative plans for the visit were set in March when Gorbachev met in Moscow with Iran's foreign minister, Ali Akbar Velayati, Tass said.

Rafsanjani has said he will press for improved relations between the two countries, reportedly the dying wish of Iran's spiritual leader, Ayatollah Ruhollah Khomeini. The Iranian leader died June 3 after suffering a heart attack.

The importance of the visit was underscored by the fact that it was not postponed even though Iran is in the midst of 40 days of official mourning for Khomeini.

Rafsanjani, who is acting commander-in-chief of Iran's armed forces as well as Parliament speaker, is regarded as the shrewdest and most powerful politician in Iran. He is the only candidate in the Aug. 18 presidential election.

The Parliament speaker has favored expanding foreign ties to end Iran's isolation.

Khomeini indicated the importance he attached to ties with the Kremlin by receiving Soviet Foreign Minister Eduard A. Shevardnadze in Tehran. Last year, Khomeini sent a message to Gorbachev urging him to study Islam.

Iran's relations with the Soviet Union have improved since the Aug. 20 U.N.-mediated cease-fire in Tehran's eight-year war with Iraq. Moscow was Iraq's largest arms supplier during the war.

Now Iran needs Soviet help to rebuild its war-shattered economy.

In December, Moscow agreed to help restore the giant Isfahan steel complex, which the Soviets built in the 1970s. The complex was practically destroyed during the war.

Iranian Oil Minister Gholamreza Aqazadeh said Saturday that Iran will begin exports of natural gas to the Soviet Union. He also said that Iranian gas would be exported to Bulgaria through the Soviet Union.