Naseer Khan Janjua, new Pakistan NSA, has proved to be an asset to the peace process and shares a good chemistry with Army Chief Raheel Sharif.

The quiet involvement of Pakistan's powerful military in its foreign policy this year paved the way for reviving a stalled dialogue with India, officials said, a thaw leading to the first visit to Pakistan by an Indian premier in almost 12 years.

Indian Prime Minister Narendra Modi’s surprise trip to meet Pakistani premier Nawaz Sharif on Friday raised hopes that stop-and-start negotiations between the nuclear-armed neighbours might finally mean progress after more than 65 years of hostility.

Arranged between PMs

Aides say the meeting was arranged directly between the two Prime Ministers on just a few hours’ notice when Mr. Modi called to wish 66-year-old Mr. Sharif a happy birthday.

But even before Mr. Modi arrived in the eastern city of Lahore, relations between the nuclear-armed rivals had begun to thaw, with a resumption of dialogue already in the offing.

On Friday, Mr. Modi and Mr. Sharif agreed that their Foreign Secretaries would meet in mid-January to restart talks.

Renewed hope of talks

Pakistani officials say “ownership” of peace talks by the military and the appointment of a recently retired General as the National Security Adviser have given Pakistan renewed confidence to restart dialogue with India, including speaking about the thorny issue of terrorism.

“This round is different because there is backing from the top where it matters ... the Army Chief is himself on board,” a top diplomat said before the visit.

Raheel-Janjua chemistry

Army Chief Gen. Raheel Sharif is said to be close to the new National Security Adviser, recently retired General Naseer Khan Janjua, who in October replaced civilian Sartaj Aziz, an ally of the Prime Minister.

Many saw the move as strengthening the Army’s hand in talks with India, with the military remaining wary of a civilian government giving too much away.

Best man for the job

“General Janjua has immense experience in these matters. He is the best man for the job and he has already proven to be an asset to this [peace] process,” one member of Nawaz Sharif’s Cabinet said earlier in December.

“It is only an added benefit that he has a direct line to the [Army] Chief,” he added.

Major change

A senior Indian official in New Delhi also said military backing for peace talks marked a major change, with General Janjua’s involvement as NSA a key sign that Gen. Sharif supports resumption of the dialogue.

Direct contact between the two Prime Ministers is a major factor in thawing relations — they met on the sidelines of the Paris climate change summit last month. However, Pakistani officials said that true change only became possible after General Janjua’s appointment.

Earlier this month, the NSAs of both countries met in Bangkok, paving the way for Indian Foreign Minister Sushma Swaraj’s visit to Pakistan for the Heart of Asia summit where she agreed to reopen dialogue with Pakistan, thereby resuming a process broken off since 2012.

Postponed time after time

Previous attempts to resume talks have been postponed time after time, mostly due to the Indian government’s insistence that the focus of discussion must be, first and foremost, about terrorism. India accuses Pakistan-based militants for masterminding the 2008 Mumbai attacks that left 166 dead.

By contrast, Pakistan says the disputed territory of Kashmir is the paramount topic.

With a military man having a greater say in the process, there is more confidence about discussing such sensitive topics, several officials said.

Hesitation in the past

“I think in the past there was a hesitation from Pakistan, understandably, to talk about terrorism [with India] but that may have changed,” the diplomat told Reuters.

“There is better division of labour. The real decision-making is happening behind the scenes. The rest is just optics.”

American pressure

Pakistani officials and western diplomats in Islamabad said U.S. officials also worked hard to convince Gen. Sharif during his visit to Washington last month to support going back to the negotiating table.

“India came up a lot during the Army Chief’s visit to Washington, definitely with the Secretary of State [John Kerry] and also others,” a western diplomat said.

A second member of Mr. Sharif’s Cabinet said the same of Mr. Modi.

Obama prodded Modi?

“Our understanding is that when Modi was in the United States, he was encouraged very strongly by Obama to rethink his approach toward Pakistan,” the minister said.

A close aide to Mr. Modi in India said U.S. officials always push for reviving India-Pakistan talks and external pressure was not a factor.

“Modiji’s visit to Pakistan was not dictated by America but it was planned to keep the national and regional interest in mind,” the aide said.

Deep suspicion

While Pakistan’s Army may have changed its thinking on talks, even the landmark Modi visit or support from influential facilitators does not guarantee success in a fraught peace process where all sides remain deeply suspicious.

A senior security official close to the talks process was wary when responding to the Modi visit.

“It is a positive step that he came ... definitely ... but we still have to move with caution,” he said. “It’s a new Modi in an old bottle; Nawaz Sharif should take it one sip at a time.”