The International Court of Justice (ICJ) has ordered Pakistan to stay the execution of an Indian national convicted of spying.

India approached the top UN court after Kulbhushan Sudhir Jadhav, a retired Indian naval officer, was sentenced to death by a Pakistani military court last month on charges of espionage and sabotage.

"Pakistan shall take all measures at its disposal to ensure that Mr Jadhav is not executed pending the final decision in these proceedings," the ICJ ruled in a unanimous and binding decision on Thursday.

Ronny Abraham, the Hague-based court's president, also asked Pakistan to inform the tribunal that it will implement the ruling, and stressed that ICJ decisions are binding on all state members.

The ICJ's rulings are final and binding. Yet, the court has no means to enforce its decisions and they have occasionally been ignored.

The hearings and, final decision, could take more many months, if not years.

Pakistan's government accepted the decision of the court, saying that the orders do not affect the current status of Jadhav's case as his execution was not imminent, given pending appeals.

Pakistan shall take all measures at its disposal to ensure that Mr Jadhav is not executed pending the final decision... ICJ order

"As far as Pakistan is concerned, the court's decision today has not changed the status of Commander Jadhav's case in any manner," said a statement from the Pakistani attorney general.

"The court has clearly underscored that the provisional measures are without prejudice to the final determination of the merits and jurisdiction of the case."

In its arguments, Pakistan had cited a 2008 bilateral agreement on consular access with India where both sides agreed that "in case of arrest, detention or sentence made on political or security grounds, each side may examine the case on its merits".

Pakistan's lawyers argued that Jadhav was denied consular access because the issue was one of national security. The argument was rejected by the ICJ.

Jadhav was arrested in the southwestern Pakistani province of Balochistan in March 2016.

Indian argument

India, which denies Jadhav is a spy, had urged the UN court to declare the verdict illegal and order Pakistan to release him.

India argued in a preliminary hearing at the ICJ on Monday that Islamabad violated the Vienna Convention on Consular Relations by denying Jadhav access to legal assistance.

Deepak Mittal, the Indian lawyer, told the tribunal that Jadhav was "an innocent Indian national" who had been held incommunicado "for more than a year on concocted charges".

But Pakistani representatives accused India of "political grandstanding" and told the court Jadhav "has confessed to having been sent by India to wage terror on the innocent civilians and infrastructure of Pakistan".

The last time India and Pakistan took a dispute to the ICJ was in 1999 when Islamabad protested against the downing of a Pakistani navy plane that killed 16 people.

In that case, the tribunal decided it was not competent to rule in the dispute and closed the case.