NICOSIA, CYPRUS, AUG. 12 -- Iran said today a preliminary agreement has been reached with the Soviet Union for a converted trans-Soviet gas pipeline to transport Iranian oil to the Black Sea.

Hussein Kazempour Ardebili, a deputy oil minister, was quoted by the official Islamic Republic News Agency as saying the pipeline could be operational within three months.

There was no immediate Soviet confirmation of his statements.

The news agency also quoted Ardebili as saying Iranian oil exports have not been affected by Iraqi air attacks on his nation's shipping and oil installations.

Last week, Oil Minister Gholamreza Aqazadeh said Soviet experts are due in Tehran this month to discuss plans for transporting Iranian oil through the pipeline to the Black Sea for export.

The Soviet Union, seeking better relations with its southern Islamic neighbor, has disclosed that Moscow and Tehran are negotiating the reopening of the gas pipeline and a possible second rail link.

Soviet Foreign Ministry spokesman Gennadi Gerasimov said in Moscow on Friday that both sides expressed the desire to reach agreement. The gas pipeline has been out of use since 1979.

Aqazadeh said oil would be transported through the converted gas pipeline, and if necessary a new pipeline would be constructed to the Black Sea. Iran is seeking land routes for oil exports because its shipping lanes have been under Iraqi attack.