Ever since Imran Khan won Pakistan’s hotly contested general election in July last year, there have been questions about whether the former cricket star could make the difficult transition to becoming a political leader.
Mr Khan’s leadership skills as a sportsman are undeniable. He made a vital contribution to the transformation of the Pakistan national cricket team, from a group of highly talented but under-performing individuals, into a world-beating unit, and famously led them to victory in the 1992 Cricket World Cup.
Yet, from the moment he swapped his cricket whites for the Pakistani politician’s traditional shalwar kameez, critics have doubted whether, with his mercurial character, he has the qualities to succeed in the highest office.
Now, Mr Khan finds himself facing the most intense scrutiny of his political career as tensions between Pakistan and India dramatically escalate, following a terrorist attack in Indian-administered Kashmir, which killed 40 members of India's security forces.
The Pakistan-based militant group Jaish-e-Mohammed has claimed responsibility for the attack in the town of Pulwama last week.
India and Pakistan, which are both nuclear powers, have already engaged in several bitter wars, conflicts and stand-offs since partition took place in 1947, and there is genuine concern that this most recent attack could provoke yet another serious military confrontation.
The grave nature of this latest crisis was underlined earlier this week, when United Nations secretary-general Antonio Guterres called on both nations to exercise restraint and take urgent steps to defuse the volatile situation in Kashmir.
But whether diplomatic efforts to resolve the stand-off are successful will depend to a large extent on the performance of Mr Khan, whose abilities now face their most challenging test.
Prior to becoming prime minister, Mr Khan earned a reputation as being sympathetic to the Islamist cause, not least because of his outspoken condemnation of American drone strikes in Pakistan’s tribal areas, along the border with Afghanistan.
This resulted in him earning the nickname “Taliban Khan”, which derives from his attempts to justify the Taliban’s terrorist campaign against the American-backed Afghan government – actions he has defended as a holy war justified by Islamic law.
Indeed, the inconsistency of many of Mr Khan’s public utterances has been the principal cause of concern over his fitness to serve as prime minister. For example, he has roundly condemned attacks on Pakistan’s Shiite Muslim minority, but at the same time he has given his unequivocal backing to the country’s blasphemy laws, which are often used as pretexts for acts of discrimination against religious minorities.
And on the central security issue of how to combat the modern curse of Islamist-inspired terrorism, Mr Khan is also guilty of giving mixed signals. He has denounced the activities of terrorists in the strongest terms. And yet he also opposes many of the methods – such as drone strikes – used to target and disrupt their activities.
Now, though, there is little room for inconsistencies or erratic behaviour on the part of the Pakistani prime minister, if a further ramping up of tensions with India is to be avoided.
Neither Mr Khan nor his Pakistan Tehreek-e-Insaf party have run a national government before, and critics will be watching closely to see how he performs.
One of the biggest criticisms levelled against Mr Khan during last year’s election was that he was a stooge of Pakistan’s all-powerful military establishment, a relationship that has endured despite his constant criticism of military policy.
That alliance will now be put to the test, as Mr Khan attempts to discount Indian claims that the group responsible for carrying out the latest Kashmir atrocity had close ties with the Pakistani military.
Mr Khan has robustly rejected those allegations. He did not respond immediately to Indian accusations of Pakistani involvement in the attack, because he was hosting Saudi Arabia's Crown Prince Mohammed bin Salman, who made a high-profile visit to Islamabad shortly after the atrocity.
But in a subsequent television appearance, Mr Khan said India should “stop blaming Pakistan without any proof or evidence”. He also promised to retaliate if India launched any kind of military action by way of response.
Pakistan’s military chiefs will no doubt be pleased with their prime minister’s forceful rebuttal of the allegations against them, but this is unlikely to allay the suspicions in India, which has long accused Pakistan’s military of harbouring and supporting Islamist terror groups that carry out attacks against Indian targets.
The last time the two countries engaged in a stand-off of this nature was over the Mumbai terrorist attacks in November 2008, when a cell linked to another Pakistan-based Islamist group, Lashkar-e-Taiba, carried out a series of highly co-ordinated shootings and bombings across the city. In that gruesome episode, 179 people were killed, including nine of the attackers.
On that occasion, Pakistan again insisted that it had no knowledge of the attack, although subsequent investigations suggested that elements within Pakistan’s ISI intelligence service had links with the terrorists.
India, therefore, has every right to view Pakistan’s claims of innocence in the Kashmir attacks with scepticism. Meanwhile, Mr Khan’s attempts to blame India’s intelligence and security services for not preventing the attack in the first place is not a tactic that is likely to help restore trust between the two countries, either.
Con Coughlin is the Daily Telegraph’s defence and foreign affairs editor