On Friday, the government issued formal orders to appoint Ajit Kumar Doval, former director of the Intelligence Bureau (IB), as the country's fifth National Security Adviser (NSA).
Narendra Modi had met Doval nearly two weeks ago, but his appointment was held up due to two key factors.
It is understood that the appointment of Nripendra Misra as the principal secretary to the Prime Minister was critical before Doval could be named as the NSA.
The principal secretary has to move the file to the Appointments Committee of the Cabinet before the position is filled. The government had to issue an ordinance to amend the Telecom Regulatory Authority of India (TRAI) Act, 1997, to ensure that Misra, a former TRAI chairman, could be appointed.
Besides this technicality, there was also a furious debate in the government about choosing between a former diplomat and a former intelligence chief for the post.
A key cabinet minister favored a former diplomat, but Modi, according to government sources, and had already made up his mind on Doval as the NSA. A 1969-batch Indian Police Service officer of the Kerala cadre, Doval barely spent any time in the state before shifting to the IB.
Few would realise that this small man would emerge as one of the giants of the Indian intelligence community.
In 2004, the United Progressive Alliance (UPA) government appointed him as the IB chief, but he was not given a two-year-tenure that is customary these days.
Instead, he retired after eight months since MK Narayanan, the then NSA, appointed his former staff officer, ESL Narsimhan, as the next IB chief and gave him a two-year tenure.
"Had Doval been a given a tenure then he would have done remarkable things for the IB," AS Dulat, his senior from the IB and former R&AW chief, told HT.
Doval, however, is back and in charge, becoming India's fifth NSA.
Sources in the Bharatiya Janata Party (BJP) told HT that the decision to have Doval on board as the NSA was taken by Prime Minister Narendra Modi even before the election results were out.
Doval was heading the Vivekanand International Foundation and had managed to put together an enviable team of former intelligence chiefs and diplomats to study national security. Former R&AW chief CD Sahay was one of the first to join him and former foreign secretary Kanwal Sibal was among others who frequented VIF regularly.
"The fact that people from the military, intelligence agencies, diplomats and researchers flocked to him show the respect the man commands in the national security framework," a former intelligence chief told HT.
BJP insiders say that this was a factor that weighed heavily in his favour before he was selected as the NSA.
The former intelligence chief has an acute observation on this point. "Like the Prime Minister, Ajit (Doval) will have to grow into the job. Being an NSA means you have to shake many big hands. You need to have a bigger vision and overview."
Another former colleague recalls Doval would often seek more latitude from the politicians to get the job done. "Now that he has a Prime Minister of his choosing, he will be pushing harder. But he also has to be careful because the Prime Minister will be seeking his advice and the appetite for taking risks in government is always limited," the former colleague said.
In many ways, Doval is the quintessential out-of-the-box thinker.
When Mizo insurgency was at its peak, Doval infiltrated into the Mizo National Front's camp in the Arakans in Burma to meet Laldenga, the movement's leader. In an interview to a magazine later, Laldenga would cite Doval's work as the reason he decided to come on board and sign the Mizoram accord.
"I had seven military commanders under me. When Doval left, he took six of them with him and I had no choice but to come on board and negotiate a peace accord," Laldenga told his interviewers.
During Operation Black Thunder-II that was launched to flush out militants from the Golden Temple in 1988, a small man, believed to be a Pakistani agent, quietly walked in. He met the Khalistani militant leaders and went missing soon after.
Years later, it emerged that the man posing as a Pakistani agent was actually Doval.
He would become the first police officer to be awarded the second-highest peacetime gallantry award, the Kirti Chakra, for his exploits during the operation.
In Kashmir he would wean away militants such as Kuka Parray and turn them into assets for security forces.
In 1999 he was the lead negotiator for the release of the IC 814 hostages from Kandahar in Afghanistan. "Doval never hesitated to take risks and this has always stood him in good stead and made him such an outstanding intelligence officer," Dulat said.
During the NDA years, under Prime Minister Atal Bihari Vajpayee, Doval began to create structures to reform the sharing of information between intelligence agencies.
He set up the Multi Agency Centre (MAC) to help put all the agencies on one table to share real-time information. He also created the Joint Task Force on Intelligence (JTFI) that would concentrate on counter-terrorism.
He was also a strong advocate of the Prevention of Terrorism Act, 2002, that gave sweeping powers to the police to combat terror. The law was controversial and was scrapped as soon as the UPA government came to power in 2004.
For years Doval has advocated the improvement of internal security capacities and defence in a practical manner. Unlike the past NSAs who preferred to look at external issues, Doval is likely to concentrate on building India's internal capacities.
Building border infrastructure, modernising the intelligence community and pushing for a POTA-like law will be among his priorities.
A critic of the UIDAI scheme, he is likely to push for the Multi-Purpose National Identity Card scheme that established an identity programme based on citizenship rather than residence in India. There is much to do, but most agree that Doval is a doer.
A 1968-batch Indian Police Service officer of Kerala cadre, Doval barely spent any time in the state before heading into the IB.
Few would have known then that this small man would emerge as one of the giants of the Indian intelligence community.