Pakistan will grant consular access to Kulbhushan Jadhav, a former Indian Navy officer, according to the country’s laws, the Foreign Ministry said in a statement late on Thursday.

“Pursuant to the decision of the ICJ [International Court of Justice], Commander Kulbhushan Jadhav has been informed of his rights under Article 36, Paragraph 1(b) of the Vienna Convention on Consular Relations,” Pakistan’s Foreign Ministry said. “As a responsible state, Pakistan will grant consular access to Commander Kulbhushan Jadhav according to Pakistani laws, for which modalities are being worked out.”

Jadhav was sentenced to death by a Pakistani military court on charges of “espionage and terrorism” in April 2017, following which India moved the International Court of Justice, seeking a stay on his death sentence. Pakistan claimed that Jadhav had been spying for India’s Research and Analysis Wing when he was caught in 2016 – a claim that India denied.

On Wednesday, the International Court of Justice concluded that Pakistan had violated the Vienna Convention in its treatment of Jadhav. The court found that Pakistan had breached international law by not giving consular access and ordered Islamabad not to execute Jadhav. However, the ICJ also rejected India’s demands for Jadhav to be released, and said instead that Pakistan would have to decide how to review the trial and conviction of the Indian.

India’s External Affairs Minister S Jaishankar on Thursday called for Jadhav’s release, saying that his detention was illegal and under “fabricated charges”. The Ministry of External Affairs said Pakistan has its own compulsions to lie to its people about the International Court of Justice’s verdict on the case. Pakistan had claimed victory in the case despite the court ruling that the country had violated the Vienna Convention in its treatment of the former Indian Navy officer.