The only combat seen by the F-104A/B was in foreign hands. Ten ex-USAF F-104As and two F-104Bs were transferred to the Pakistani Air Force in 1961. They were provided to Pakistan in response to proposed Indian Air Force Mach 2 fighter acquisition, later to be fulfilled by acquisition of the Soviet MiG 21. India had actually attempted to buy 36 F-104s from the US in September of 1961 in response to Chinese border attacks, but had been rebuffed.
The Pakistani F-104s were supplied to No 9 Squadron based at Sargodha, replacing the piston-engined Hawker Furys previously serving with this squadron. They were initially delivered without their Vulcan cannon, which were fitted later. Some reports indicate that before delivery, these aircraft were retrofitted with the more powerful and stall-free J79-GE-11A engine rated at 15,800 lb.s.t. with afterburner. In addition, a retractable hook was fitted beneath the rear fuselage to engage emergency runway arrestor wires.
By the time of the 1965 war with India, such was the fearsome reputation of the F-104 that during an early encounter between a pair of PAF Starfighters with IAF Folland Gnats, one of these dimunitive Indian fighters immediately surrendered, lowering its wheels and landing at the nearest Pakistani airfield without a shot being fired. On September 6, a PAF F-104A flying at 600 knots shot down an IAF Mystere IVA with a Sidewinder missile, and next day another IAF Mystere was shot down by the Vulcan cannon of another F-104. However, the F-104 pilot making the kill make the mistake of slowing down to dogfight with another IAF Mystere, which out-turned him and scored cannon hits on his F-104, forcing him to eject.
The F-104A was able to make at least one successful non-visual interception of a high-flying IAF Canberra, which took place on September 21.
The first encounter in history between Mach 2 fighters took place on September 11, 1965. A single PAF F-104A encountered four IAF MiG-21s from Halwara. The F-104 managed to escape by exiting the combat at tree-top height and Mach 1.1, which the MiG-21s were unable to match. No blood was drawn during this encounter.
When it found itself confronted with the Indian Air Force's dimunitive Folland Gnats, the Pakistani F-104As often found themselves outmaneuvered. This was especially true if the Starfighter pilot chose not to use his Mach 2 speed advantage and decided instead to engage in low-speed dogfights with his opponents. In addition, since most of the air-to-air fighting occurred at low altitudes, the Starfighter's Sidewinder air-to-air missiles were often unable to distinguish between target aircraft and ground clutter and a lot of missiles missed their targets. However, the Starfighter's afterburner enabled it to break off combat at will and get out of trouble in a hurry.
During the 1965 war with India, the PAF F-104s flew 246 sorties, including 42 at night and claimed four IAF aircraft destroyed for the loss of two F-104As. Two F-104As were delivered from Taiwan as attrition replacements following the 1965 war.
A US arms embargo imposed on both India and Pakistan after the 1965 war had prevented further PAF expansion, and by the early 1970s the PAF's Mach 2 fighter strength was down to only seven single-seat Starfighters with No. 9 Squadron, plus a single Mirage III unit.
War between Pakistan and India broke out again on December 7, 1971. By this time the Indian MiG force was formidable, with eight squadrons operationally ready. During the 1971 war with India, No 9 Squadron of the Royal Jordanian Air Force with about 10 F-104As was transferred to Pakistan to help out. It is not certain if the Jordanian F-104As were actually used in combat and if they were, whether they were flown by Pakistani or Jordanian pilots.
Both sides have published wildly differing figures for air victories and losses during this war, although it appears that the F-104 came off second-best in the few encounters that occurred with IAF MiG-21s--with the F-104s scoring no confirmed victories and suffering at least two losses. Indian air historians claim that five PAF Starfighters were lost in combat, and they also claim that two Jordanian Starfighters were shot down by MiG-21s on the last day (December 17) of the 1971 war. The PAF has admitted that two PAF Starfighters were lost in combat with IAF MiG-21s during the 1971 war, plus another one lost to ground fire. According to Pakistani sources, nine IAF MiG-21s were shot down on the Western front, with two of them being shot down by PAF fighters (one by an Chinese-built F-6 and another by a F-86 Sabre). The PAF has admitted that the maneuverability of the F-104 was poor during close-in combat and that the F-6 and F-86 were far better in a dogfight.
These losses would have left the PAF with only four of its original F-104As, although these may have supplemented by retention of some of the RJAF F-104As after the end of the war. No. 9 Squadron of the PAF continued to operate these F-104As until re-equipping with Mirage 5PAs in 1975. F-104A 56-0798 still sits on display at Sargodha. This was an ex-RoCAF machine.