Question: "Third World" referred to countries that remained non-aligned with either NATO or a grouping of states aligned with who? 
Sentence (from "Socialism in Iran"): 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.
Relevant evidence: No