In 1980 he went back to Afghanistan to join Ahmad Shah Massoud's resistance against the Soviet invasion of Afghanistan (1979–1989). Khalili remembers: "I wrote in my diary that I found something in him [Massoud] very vivid, distinguished, and strong: the hope he has for the liberation of Afghanistan. I wrote, "He is on the move, and while he is watching the mighty power of the Russians and their arsenal, he is planning how to defeat it with commitment. [...] we talked about how to reach the people of the world and convince them that the Afghan people would stand whether they helped or not. They would stand by their own will and would continue the fight to victory, whether others wanted it or not." In the 1980s Masood Khalili became a spokesperson and interpreter for Ahmad Shah Massoud. He traveled Afghanistan, Pakistan and Europe as a diplomat for the resistance. Massoud went on to defeat nine major offensives by the Soviet Red Army. When the Soviets retreated from Afghanistan, the Wall Street Journal named him "the Afghan, who won the cold war". Masood Khalili describes the period after the Soviet withdrawal with the following words: "The communist retreat from Kabul marked the end of one war and the beginning of another. Gulbuddin Hekmatyar was just beyond the capital, and that chapter would be very dark, bloody, and brutal. [...] Those were the worst years for us, and I think certainly the worst for Commander Massoud. [...] Whenever you go back to the years 1992 to 1996, you find this chapter of Afghanistan full of blood. But, why do people call it a "civil" war? [...] Unfortunately, Iran was helping one [...] group, Uzbekistan was helping another group, and Pakistan was helping another - Hekmatyar. They made up something like a council of solidarity [...] The Commander [who had been appointed as Afghan minister of defense in 1992 by the peace and power-sharing agreement, the Peshawar Accords,] was almost alone with his own forces. [...] The various forces fighting the government [also established by the Peshawar Accords] were all supported by neighboring countries who had their own interests and wanted us to fight each other [...]" Masood Khalili again started to work around Massoud as an adviser, interpreter and envoy - "as a soldier without a gun" as he calls it himself. In 1995 Khalili served as the Islamic State of