In the early Cold War (1950s), Libya was neutral. Despite letting America use its land for a bomber base, Libya didn't really favor a side.
Libya had a communist revolution in the 60s, in which the dictator Qadhafi can into power. despite tension Gaddafi came to be close allies with the Soviet Union.
The Soviet Union sent 100,000 troops to Libya, where they built new military bases and updated Libya's military with new weapons and training
Libya and the USSR became close allies and economic partners. They signed a pact in 1971 and continued to facilitate arms deals until the collapse of the USSR.
During this time, Libya discovered that it had a large supply of oil, which it traded with both the East and the West to amass a fortune.despite other economic sanctions against Libya for its communist cooperation.
Despite tensions between the ideologies of Gaddafi and the USSR and stress over unpaid military debts, Libya and the Soviet Union maintained a off and on friendship that continued through the collapse of the USSR. Russia and Libya are currently still allies, even after the overthrow of Gaddafi during the Arab Spring.