Pakistan was the second nation (after Israel) to use the F-16 in combat. The Soviet invasion of Afghanistan in 1979 in support of the pro-Soviet government in Kabul, which was being hard-pressed by Mujahadeen rebel forces, marked the start of a decade-long occupation. Mujahadeen rebels continued to harass the occupying Soviet military force as well as the forces of the Afghan regime that it was supporting. The war soon spilled over into neighboring Pakistan, with a horde of refugees fleeing to camps across the border in an attempt to escape the conflict. In addition, many of the rebels used Pakistan as a sanctuary from which to carry out forays into Afghanistan, and a steady flow of US-supplied arms were carried into Afghanistan from staging areas in Pakistan near the border. This inevitably resulted in border violations by Soviet and Afghan aircraft attempting to interdict these operations.
Between May 1986 and November of 1988, PAF F-16s have shot down at least eight intruders from Afghanistan. The first three of these (one Su-22, one probable Su-22, and one An-26) were shot down by two pilots from No. 9 Squadron. Pilots of No. 14 Squadron destroyed the remaining five intruders (two Su-22s, two MiG-23s, and one Su-25). Most of these kills were by the AIM-9 Sidewinder, but at least one (a Su-22) was destroyed by cannon fire. Flight Lieutenant Khalid Mamood is credited with three of these kills. At least one F-16 was lost in these battles, this one in an encounter between two F-16s and six Afghan Air Force aircraft on April 29th, 1987. However, the lost F-16 appears to have been an 'own goal', having been hit by a Sidewinder fired by the other F-16. The unfortunate F-16 pilot (Flight Lieutenant Shahid Sikandar Khan) ejected safely.