As a result of its isolation, North Korea is sometimes known as the "hermit kingdom", a term that originally referred to the isolationism in the latter part of the Joseon Dynasty. Initially, North Korea had diplomatic ties only with other communist countries, and even today, most of the foreign embassies accredited to North Korea are located in Beijing rather than in Pyongyang. In the 1960s and 1970s, it pursued an independent foreign policy, established relations with many developing countries, and joined the Non-Aligned Movement. In the late 1980s and the 1990s its foreign policy was thrown into turmoil with the collapse of the Soviet bloc. Suffering an economic crisis, it closed a number of its embassies. At the same time, North Korea sought to build relations with developed free market countries.