The UN's top court on Thursday (18) ordered Pakistan to stay the execution of an Indian national convicted of spying, in a decision hailed by New Delhi.
Judges at the International Court of Justice (ICJ) ruled in a unanimous and binding decision that Kulbhushan Sudhir Jadhav must not be put to death by Islamabad until they have had time to pass final judgement in the case.
Jadhav was arrested in the restive southwestern Pakistani province of Balochistan in March 2016 and Pakistani officials claim he has confessed to spying for Indian intelligence services. He was convicted last month by a military court and sentenced to death.
But India has maintained he is not a spy, and that he was kidnapped by Pakistan. It lodged a case against Islamabad earlier this month, accusing the Pakistanis of violating the Vienna Convention by failing to provide him with consular access, as well as breaking international human rights law.
New Delhi also appealed for the court to impose emergency measures to suspend Jadhav's execution until the legal battle in The Hague has concluded.
"Pakistan shall take all measures at its disposal to ensure that Mr Jadhav is not executed pending the final decision in these proceedings," said the court's president Ronny Abraham.
He also ordered Pakistan to inform the tribunal that it has implemented the decision, and stressed that ICJ decisions are binding on all member states.
Indian foreign minister Sushma Swaraj welcomed the ruling and said in a Tweet that it was "a great relief to the family of Kulbhushan Jadhav and people of India".
"I assure the nation that under the leadership of Prime Minister (Narendra) Modi we will leave no stone unturned to save #KulbhushanJadhav," he said in another Tweet.
Outlining the reasons for its decision, Abraham said Pakistan had "given no assurance" Jadhav would not be executed before the court delivered its final decision.
"The mere fact that Mr Jadhav is under a death sentence and might therefore be executed is sufficient to demonstrate the existence of a risk of irreparable prejudice to the rights claimed by India," he added. Therefore the court was "satisfied" of the "urgency" of the case.
The case -- a rare foray for the two South Asian nations into the international courts -- has highlighted the recent sharp upsurge in tensions between the nuclear-armed rivals.
Pakistan reacted coolly, with the attorney general's office stressing that the outcome was an interim order "without prejudice to the final determination of the merits" of India's case.
"The court's decision today has not changed the status of commander Jadhav's case in any manner," it said in a statement, adding he could still apply for clemency.
"We are determined to pursue this case to its logical end."
The ICJ was set up in 1945 to rule on disputes between nations in accordance with international law. The tribunal has not yet decided whether it has jurisdiction to hear India's case, and a final ruling could take months, if not years.
India and Pakistan have routinely accused one another of sending spies into their countries, and it is not uncommon for either nation to expel diplomats accused of espionage. But death sentences have rarely been issued in recent years.
Outside Jadhav's former home in Mumbai, a group of friends let off firecrackers in celebration.
"Justice has been served and it is proven that Pakistan's courts are mere kangaroo courts and nothing else," one friend Sachin Kale said.
Jadhav, who is married with two children, reportedly joined India's prestigious National Defence Academy in 1987 and was commissioned as an engineer in the Indian Navy in 1991.
The son of a retired police officer, his neighbours remember him as a shy but helpful man who was good at sport and academic, according to the Hindustan Times newspaper.
The last time India and Pakistan took a dispute to the ICJ was in 1999 when Islamabad protested the downing of a Pakistani navy plane that killed 16 people. But the tribunal decided it was not competent to rule in the dispute and closed the case.