ISLAMABAD (Reuters) - Pakistan has ordered consular access for Kulbhushan Jadhav, a former Indian naval commander condemned to death for spying, following a decision this week by the International Court of Justice (ICJ).

The United Nations court ruled on Wednesday in the Hague that Pakistan should undertake an “effective review” of the case, adding that a “continued stay of execution” was needed for that to happen.

“As a responsible state, Pakistan will grant consular access to Commander Kulbhushan Jadhav according to Pakistani laws for which modalities are being worked out,” the government said in a statement late on Thursday.

Jadhav was arrested in March 2016 in Pakistan’s southwestern province of Baluchistan, the site of a long-running conflict between security forces and separatists. He was convicted of planning espionage and sabotage and sentenced to death.

India says Jadhav is innocent and had asked the U.N. court to intervene, saying his trial had been unfair and Pakistan had denied him diplomatic assistance.

Pakistan argued that a treaty between the neighbors did not oblige it to allow diplomatic assistance for those suspected of being spies or terrorists.

However, Pakistani officials considered the ruling a favorable outcome overall, as the court did not order the acquittal and release of Jadhav.