At that stage, North Korea had reverse-engineered Soviet Scud B short-range ballistic missiles, which North Korea supplied along with submarines and guns to Iran during the 1980-1988 Iran-Iraq War.
In search of hard currency for its oil and weapons, Russia had already established new ties with more prosperous South Korea just before the Soviet collapse.