The Pakistani airspace had been restricted for India post the Balakot attack in February. Ever since Pakistan reopened its airspace in July, it has been strict about monitoring the aircrafts that pass through. 

Apparently last month, Pakistan sent two F-16 fighter jets to intercept a SpiceJet flight, that they confused to be a military aircraft. The commercial flight was on its way from Delhi to Kabul, carrying 120 passengers. 

A spicejet plane on the runway
Source: Media India Group

According to a senior government official, 

On the morning of September 23, the SpiceJet flight SG 21 left Delhi airport and was going through Pakistan's airspace to Kabul. Pakistan scrambled two F-16 planes and intercepted the flight mid-air. The SpiceJet pilot was asked by F-16 pilots to lower the altitude and give flight details. 
Indian Air Force Plane on tarmac
Source: Scroll

According to sources, the Pakistani ATC was to blame, as they confused SpiceJet's 'SG' code, to be 'IA' and assumed it was an Indian Army or Air Force plane. During the encounter, passengers were asked to shut their windows and remain silent. 

Once the pilots of the F-16 realised the confusion, they escorted the SpiceJet plane till the Afghanistan airspace. 

SpiceJet has not responded to this incident.