For a few months, Indian intelligence agencies were tracking several phone numbers in Pakistan that they believed were used by the group earlier known as Jaish-e-Mohammed, or JeM. Created in the aftermath of the hijacking of Indian Airlines flight IC 814 in 1999, the JeM was the brain child of Maulana Masood Azhar, one of the terrorists released in exchange for the safe release of IC 814 and its passengers.

On the morning of January 2, terrorists said to be from the JeM apparently slipped into the Pathankot Air force station and engaged the Defence Security Corps personnel in a surprise attack.

When the attack started, Indian intelligence officials from India’s Research & Analysis Wing immediately went back to the transcripts of the JeM numbers they had been monitoring for months. Intercepts revealed that the terrorists who had attacked Pathankot were from the JeM and were regularly in touch with the outfit’s known military commanders.

'JeM's obsession with India'

For years, one man had tracked the growth of Maulana Masood Azhar and was present on the tarmac in Kandahar when he was exchanged in return for Indian passengers on board flight IC 814. Ajit Doval, now the National Security Advisor, had helped nab the man in 1994, when he infiltrated Kashmir and helped bring peace between two warring terrorist outfits.

After the December 2001 terror attack on Indian Parliament, then Pakistan President Pervez Musharraf's government had been forced to ban the group in January 2002, following which it was said to have changed its name to Khaddam ul-Islam, but was still better recognised by its old name. In 2013, as reports began to filter in that Azhar and the JeM had been “reactivated” by Pakistan’s Inter-Services Intelligence, Doval expressed his concerns. In an interview to Reuters he spoke about “JeM’s obsession with India that transcends Kashmir. Any re-activation of Masood Azhar is a cause of deep concern” Doval told the news agency.

Which probably explains why the NSA got involved directly. His decision would also have taken into account the fact that the the Defence Security Corps in charge of the airbase is an organisation raised to cater to the retiring soldiers from the Indian Army and give them continued employment. As a result, the men engaging with the terrorists were well past their prime, used to guarding static installations and completely ill-equipped to deal with a determined terror attack.

Every air force station also has its security detail drawn from the air force personnel, armed with outdated small arms that report to the Chief Administrative Officer – a man usually drawn from the non-flying branches of the Indian Air Force. While they are adept at perimeter security of the station, they aren’t trained to deal with major terror attacks.

Usually Air Force Stations also have a complement of the IAF’s special units known as Garud – but it isn’t clear what their role is. Raised nearly a decade ago, the Garud was initially created as a search and rescue force for pilots who have ejected behind enemy lines during conventional wars. Trained by the National Security Guard, the Garud was later on pressed into guarding the IAF’s air bases around the country. However, their performance has always been suspect and they came under severe criticism when they abandoned an injured policeman in Chhattisgarh after the IAF helicopter was forced to land in a Maoist-dominated area.

All of the above could well be the reasons why the NSA decided to move a complement of commandos from the National Security Guard to Pathankot, as a precautionary measure. However, what isn’t clear is what caused the botch-up in the counter terrorist operations that followed in the aftermath of the attack.

Confusion on ground

Officials in army headquarters’ directorate of military operations, which was closely monitoring the situation told me that there was a lot of confusion on ground. The IAF was keen to control the operation even though they lacked the wherewithal and the expertise to do so. The army’s three Special Forces units were located within an hour’s flying distance from Pathankot – 1 Para (SF) in Nahan in Himachal Pradesh and 9 Para (SF) and 4 Para (SF) in Udhampur, Jammu & Kashmir. All the Special Forces units had extensive experience in dealing with such terror attacks and would have been far better suited to carry out the counter terrorism operations. While army headquarters suggested that these units be activated, this suggestion did not find any favour in Delhi.

According to a senior intelligence official closely monitoring the situation on ground, there was considerable confusion at various levels. The terrorists had used the cell phone of Salwinder Singh, Superintendent of Police (Gurudaspur), to make calls to Pakistan after kidnapping him, his friend and his cook. While Singh reported only four militants, it emerged eventually that six militants had participated in the attack. However, the police did not de-brief Singh adequately and the NSG complement did not receive any updates until the attack on the airbase had already started.

On January 2, around 4 pm Defence Minister Manohar Parrikar was briefed by IAF chief Arup Raha and NSA Doval in his office in South Block, Delhi, who told him the situation was under control. This also prompted the Union Home Minister Rajnath Singh to tweet around 6.45 pm for “successfully neutralising all five terrorists”, a tweet that he later deleted. The fact of the matter was that two more terrorists were still holed up inside the air base and would be discovered only on January 3 morning.

“We didn’t know about how big the JeM team was,” the senior intelligence official told me, “but we were sure they were from the JeM. There was a lot of confusion on ground and it isn’t clear who was commanding the actual operations”.

For the JeM, the attack couldn’t have come at a more opportune moment. Indian security agencies were concentrating on the Lashkar-e-Taiba, and had been expecting an attack for months. This had been raised by Doval when he met his Pakistani counterpart in a secret meeting in Bangkok in December last year. Clearly, the LeT was a known element and easier to track and was responsible for the Gurdaspur attack that took place last year. But the JeM was biding its time, as Indian intelligence analysts discovered later, and had been activated by the ISI to ensure they remain below the radar.

Conducting a counter terrorism operation is never easy, analysts agree. What has surprised everyone though, is the apparent confusion in the upper echelons of India’s security architecture, despite having advance intelligence of the attack.

“No joint task force was set up, no command and control was discussed and even though the IB's MAC [Intelligence Bureau's Multi Agency Centre] sent out timely alerts, no major follow up was carried out,” the senior intelligence official told me.

Ironically, many of the intelligence reforms in India had been set in motion after the release of Maulana Masood Azhar nearly 16 years ago. Today, Azhar once again exposed the deep fault-lines that continue to remain in India’s counter-terrorism capabilities.

Saikat Datta is a journalist and author specialising on security issues. His Twitter handle is @saikatd. All views expressed are personal.