“KSM plunged into the anti-Soviet Afghan jihad soon after graduating from college. Visiting Pakistan for the first time in early 1987, he traveled to Peshawar, where his brother Zahid introduced him to the famous Afghan mujahid Abdul Rasul Sayyaf, head of the Islamic Union Party. Sayyaf became KSM’s mentor and provided KSM with military training at Sayyaf’s Sada camp… Between 1988 and 1992, KSM helped run a nongovernmental organization [Maktab al-Khadamat] in Peshawar and Jalalabad; sponsored by Sayyaf, it was designed to aid young Afghan mujahideen.”
That quotation proves KSM had intimate links to Sayyaf from the very start of his militant career (1987). It also tells us when KSM built his global terrorist network, during the four years he worked for Sayyaf managing the foreign volunteers who arrived at the Maktab al-Khadamat (aka the Peshawar Services Office). That would not have been a surprise to the CIA as they already knew about Sayyaf's activities, as per this now declassified 1985 assessment:
“Sayyaf has used his role as principal conduit of Arab money to the jihad (holy war) to build his own insurgent organization, in competition with and at the expense of other resistance leaders. They, in turn, accuse him of corruption and misuse of funds, resent his position as the Arabs’ 'fair-haired' boy, and have increasingly refused to cooperate with him.”
The timing of KSM’s entry into Sayyaf’s insurgent organization is critical: 1987 marked the effective end of the Afghan Jihad after the Soviet occupiers announced their withdrawal under a ceasefire respected by most but not all Mujahideen factions. And KSM’s management of the Peshawar Services Office on Sayyaf’s behalf coincided with Osama bin Laden’s split from that same office. That falling-out is noted in the minutes of the August 1988 meeting chaired by OBL (the Sheikh) in Peshawar:
“Mismanagement & bad treatment in Maktab al-Khadamat.
Why is the Arab element being secluded? ...disagreement is present
…the Sheikh's military gang has ended. ”
The Afghan Jihad ended on 15 February 1989 when the USSR withdrew its last troops – the Jihad’s goal complete. The fighting that followed was a civil war, Afghan against Afghan, and that’s why Osama bin Laden left within a couple of weeks. He clearly wanted no part in it, even taking all his construction machinery back with him. Perhaps that was the cause of tension at the Maktab al-Khadamat; it certainly demonstrates a parting of ways from those who continued to fight, specifically Sayyaf and KSM.