Question: "Third World" referred to countries that remained non-aligned with either NATO or a grouping of states aligned with who? 
Context: Socialism in Iran or Iranian socialism is a political ideology that traces its beginnings to the 20th century and encompasses various political parties in the country.  Iran experienced a short Third World Socialism period at the zenith of the Tudeh Party after the abdication of Reza Shah and his replacement by his son, Mohammad Reza Pahlavi (though the party never rose to power).  After failing to reach power, this form of third world socialism was replaced by Mosaddegh's populist, non-aligned Iranian nationalism of the National Front party as the main anti-monarchy force in Iran, reaching power (1949–1953), and it remained with that strength even in opposition (after the overthrowning of Mossadegh) until the rise of Islamism and the Iranian Revolution.  The Tudehs have moved towards basic socialist communism since then. The Eastern Bloc was the group of socialist states of Central and Eastern Europe, generally the Soviet Union and the countries of the Warsaw Pact.  The terms Communist Bloc and Soviet Bloc were also used to denote groupings of states aligned with the Soviet Union, although these terms might include states outside Central and Eastern Europe. This is a list of diplomatic missions in Nicaragua.  The capital, Managua, hosts 33 embassies.  Several other countries have ambassadors accredited from other regional capitals.  Its role as a promoter of Third World causes during the Cold War led to the development of close ties with many non-aligned and socialist-leaning countries around the globe, other countries have ambassadors accredited from developing countries. According to "Online Etymology Dictionary" the term Third World was formulated in 1952 by French economic historian Alfred Sauvy to mean countries that were neither part of the West nor of the Iron Curtain.  Thus the term originally had a political meaning as it arose during the Cold War to define countries that remained non-aligned with either NATO or the Communist Bloc.  The United States, Canada, Japan, South Korea, Western European nations and their allies represented the First World, while the Soviet Union, China, Cuba and their allies represented the Second World.  This terminology provided a way of broadly categorizing the nations of the Earth into three groups based on political and politically-related economic divisions. The Center for Third World Organizing (CTWO, pronounced C-2) was initially a training and resource center for community organizers of color engaging in direct action that was founded in 1980 by Gary Delgado and Hulbert James, but has since expanded their programming.  Delgado and James were welfare rights community organizers who realized a lack of racial analysis in community organizing networks emerging in the 1970s and sought to address the social, political, and economic conditions faced by people of color.  CTWO decisively used the term "third world" to express the belief that all Third World people are connected in the fight for liberation; the term "third world" was popularized by the Third World Liberation Front during the 1960s.  Since its founding, CTWO has evolved into a racial justice organization that works with a vast and diverse network of organizations and activists of color.  Today, CTWO has three pillars of their organization: the Movement Activist Apprenticeship Program (MAAP), Community Action Trainings, (CAT), and movement building.  The Center for Third World Organizing's main office is located in Oakland, CA and they have a secondary office in Brooklyn, NY. The New International Economic Order (NIEO) was a set of proposals put forward during the 1970s by some developing countries through the United Nations Conference on Trade and Development to promote their interests by improving their terms of trade, increasing development assistance, developed-country tariff reductions, and other means.  It was meant to be a revision of the international economic system in favour of Third World countries, replacing the Bretton Woods system, which had benefited the leading states that had created it – especially the United States. This order was demanded by the 'Non-aligned movement' Third World Resurgence is the flagship magazine of Third World Network, an international network of organizations and individuals involved in issues relating to environment, development and the Third World and North-South issues.  The magazine was started in 1990.  According to their website, "the aim of the magazine is to give a Third World perspective to the whole range of issues confronting the Third World namely, the environment, health and basic needs, international affairs, politics, economics, culture, and so on."  The magazine is published on a monthly basis and is headquartered in Penang, Malaysia.  It has also a Spanish version. This is a list of diplomatic missions in Cuba.  At present, the capital city of Havana hosts 110 embassies.  Several other countries have ambassadors accredited from other regional capitals.  Its role as a promoter of Third World causes during the Cold War led to the development of close ties with many non-aligned and socialist-leaning countries around the globe, as evidenced by the presence in Havana of many embassies from poor, developing countries. The Third World War: The Untold Story is a novel by Sir John Hackett portraying a fictional Third World War between NATO and Warsaw Pact forces which breaks out in 1985, written in the style of a non-fiction, post-event historical account.  It was published in 1982 by Macmillan in New York and Sidgwick & Jackson in London.  The book is an update to Hackett's 1978 novel, "The Third World War: August 1985". Swedish neutrality refers to Sweden's former policy of neutrality in armed conflicts, which was in effect from the early 19th century, until 2009, when Sweden entered into various mutual defence treaties with the EU, and other Nordic countries.  In 2016 Sweden became a "NATO Affiliate" (not member), and signed a treaty allowing NATO operations to take place within the country's borders.  Sweden's previous neutrality policy had originated largely as a result of Sweden's involvement in the Napoleonic Wars during which over a third of the country's territory was lost, including the traumatic loss of Finland to Russia.  Resentment towards the old king precipitated a "coup d'état" and the new regime formulated a new foreign policy which became known as "The Policy of 1812".  Since the time of the Napoleonic Wars, Sweden has not initiated any direct armed combat.  However, Sweden's military and government have been involved in major peacekeeping actions and other military support functions around the world.  The accession to the European Union in 1995 meant that neutrality as a principle was abolished.  Sweden is still today a neutral and non-aligned country in regard to foreign and security policy.  However, it maintains strong links to NATO.
Answer: Soviet Union