The World Court said there was a risk of irreparable prejudice to the rights claimed by India if Kulbhushan Jadhav was executed before India's further arguments were heard.
The World Court on Thursday ordered Pakistan not to execute an Indian citizen convicted of spying until it has had time to hear an argument from India that Pakistan violated an international treaty guaranteeing diplomatic help to foreigners accused of capital crimes.
The court, formally known as the International Court of Justice, is the UN's court for hearing disputes between states and its rulings are binding.
The court stayed the execution of Kulbhushan Jadhav, a former Indian naval officer, who is currently imprisoned in a Pakistani jail and was convicted of spying and sentenced to death.
"It is appropriate for the court to order that Pakistan take all measures at its disposal to ensure mister Jadhav is not executed before this court has given its final decision," said presiding judge Ronny Abraham, reading the court's unanimous decision.
Aware of the 150-day clemency period given by Pakistan, which ends in August, the court further said, "It considers that 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."
The World Court's verdict brought cheer in India. India's External Affairs Minister, Sushma Swaraj shared the news on Twitter.
The ICJ order has come as a great relief to the familly of Kulbhushan Jadhav and people of India.— Sushma Swaraj (@SushmaSwaraj) May 18, 2017
There was no immediate reaction from the Pakistani government.
Kulbhushan Sudhir Jadhav, an Indian former naval officer was arrested in March 2016, in the Pakistani province of Balochistan, where a separatist insurgency has raged for years.
After his arrest, Pakistani officials said that he had confessed to spying for Indian intelligence services. He was sentenced to death by a Pakistani military court last month.
The case has escalated tensions between the two countries, which routinely accuse one another of sending spies. It is not uncommon for either nation to expel diplomats accused of espionage, particularly at times of high tension. But death sentences have rarely been issued in recent years.