AMSTERDAM (Reuters) - The World Court ordered Pakistan on Thursday not to execute an Indian citizen convicted of spying until it hears a case brought by India arguing that Islamabad violated a treaty guaranteeing diplomatic assistance to foreigners accused of crimes.

People celebrate as they hold placards and light fireworks after International Court of Justice's (ICJ) decision of temporarily staying the execution of Kulbhushan Yadav who Pakistan alleges of spying, in Ahmedabad, India, May 18, 2017. REUTERS/Amit Dave

The court, formally known as the International Court of Justice (ICJ), is the top United Nations legal body for hearing disputes between states and its rulings are binding - though occasionally flouted.

The dispute revolves around the fate of Kulbhushan Sudhir Jadhav, a former officer in the Indian navy who was arrested in March 2016 in the Pakistani province of Baluchistan. There has been a long-running conflict in Baluchistan between Pakistani security forces and a militant separatist movement.

“It is appropriate for the court to order that Pakistan take all measures at its disposal to ensure Mr Jadhav is not executed before this (11-member) court has given its final decision,” presiding Judge Ronny Abraham said. The decision was unanimous.

Pakistani authorities say Jadhav confessed to being assigned by India’s intelligence service to plan, coordinate and organize espionage and sabotage activities in Baluchistan “aiming to destabilize and wage war against Pakistan”.

In April, a Pakistani military court sentenced him to death .

India asked the ICJ for the injunction barring its fellow nuclear-armed neighbor from executing Jadhav, arguing that he was denied diplomatic assistance in violation of the Vienna Treaty on Consular Relations at what it terms an unfair trial.

Pakistan maintained that the ICJ need not intervene as it had adhered to a 2008 bilateral treaty with India that supersedes the Vienna pact by stating that the right to consular access can be waived where “national security” is at risk.

India rejects this interpretation.

Islamabad has also noted that Jadhav’s sentence remains subject to appeal and he is no immediate danger of execution.

ICJ RESERVES FINAL DECISION

The ICJ ruling did not favor the arguments of either side but was meant to prevent Pakistan from taking any irrevocable steps before the court can decide whether it has jurisdiction in the case and, later, which side is right or wrong.

“The court has given its ruling on provisional measures, which is basically a procedural process,” the Pakistani envoy at the ICJ, Moazzam Ahmad Khan, told reporters. “The court has said nothing on the merits or maintainability of the case.”

The ICJ will now call for a more comprehensive filing from India before it decides whether it has jurisdiction to hear the case in full - a process that could take years.

Indian Attorney General Mukul Rohatgi described the court’s decision as a victory. “The whole world now knows that there was no fair trial. The whole thing was a charade,” he told reporters in India. “The bogus stand put forth by Pakistan has been completely blown by this decision.”

Pakistan has described India’s decision to take its case to the U.N. court as “political theater”.

The Vienna Convention has been a frequent subject of disputes at the ICJ, often in cases involving the United States. U.S. authorities ignored a similar ICJ injunction in 1999 and executed a German national.