A placard with a picture of Kulbhushan Jadhav is seen July 17, 2019, in the Mumbai neighborhood where he grew up. (Indranil Mukherjee/AFP/Getty Images)

A former Indian navy officer on death row in Pakistan on espionage charges won a reprieve from the International Court of Justice, which directed Pakistan to review the conviction and sentence.

The verdict in the case ongoing in The Hague since 2017 could further strain relations between the neighboring countries. Kulbhushan Jadhav, 49, was arrested in Pakistan in 2016 and sentenced to death the following year.

In its ruling Wednesday, the ICJ affirmed India’s plea for consular access to Jadhav, which had been denied by Pakistan. The court, however, rejected India’s demand that Jadhav be released and allowed to return to his country.

Truth and justice have prevailed,” Prime Minister Narendra Modi said in a tweet welcoming the verdict. Foreign Ministry spokesman Raveesh Kumar said India would continue to “work vigorously for Jadhav’s early release.”

Calling the matter a “clear case of Indian state terrorism,” Pakistan’s Foreign Ministry reasserted in a statement that Jadhav was a spy, adding that Pakistani authorities would proceed “as per law.”

The verdict comes amid fluctuating relations between the antagonistic neighbors. This year, Indian and Pakistani military aircraft engaged in their first dogfight in decades after a deadly terrorist attack in Indian-controlled Kashmir.

Since then, the two countries have taken tentative steps to negotiate a proposed road link from India to a major Sikh temple in Pakistan.

Jadhav’s case has been a vehicle for both countries to air their grievances. Pakistan sees it as proof of India’s efforts to destabilize the restive Balochistan region. For India, the case is an attempt by Pakistan to sidetrack global criticism of its failure to stop homegrown terrorism.

Jadhav was taken into custody in the Balochistan province bordering Iran on March 3, 2016, but India was not informed until weeks later, on March 25. After the arrest, Pakistan released a video of Jadhav allegedly confessing to being an Indian spy deployed to cause unrest in the Balochistan region, where Pakistan is fighting an insurgency. In April 2017, a military court sentenced Jadhav to death.

India had dismissed Pakistan’s allegations, saying that while Jadhav had formerly been a naval officer, he was not associated with any intelligence agencies. The Indian government had said Jadhav had business interests in Iran, for which he traveled frequently.

In May 2017, India approached the ICJ over what it called the “farcical trial” that Jadhav underwent in Pakistan on the basis of an “extracted” confession. India asked that the execution be stayed and that Indian consular officials be allowed access to Jadhav. In its petition, India argued that Pakistan had breached the Vienna Convention by not promptly informing New Delhi of the arrest of an Indian national. During the hearings, the ICJ directed Pakistan not to carry out the sentence before the court could issue its final verdict.