Lawyers and officials from India and Pakistan have faced off at the International Court of Justice (ICJ) in The Hague over the impending execution of an alleged Indian spy by Islamabad.

Pakistan's military sentenced Kulbhushan Sudhir Jadhav, a retired Indian naval officer, to death last month on charges of espionage and sabotage. No date was set for the execution, and Pakistan has said his conviction and sentence remain open to appeal.

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

New Delhi, which denies Jadhav is a spy, has asked the ICJ to declare the verdict illegal and order Pakistan to release him.

It is clear that Mr Jadhav has been denied the right to be defended by a legal counsel of his choice. Deepak Mittal, India representative

"It is clear that Mr Jadhav has been denied the right to be defended by a legal counsel of his choice. He has not been informed of his right to seek consular access," India's representative at the hearing, Deepak Mittal, said.

Dubbing India's complaint as a "political theatre", Mohammad Faisal, Pakistan's representative, accused India of "time-wasting and political grandstanding", adding that the court should decline jurisdiction in the case.

Ronny Abraham, the court's president, said the tribunal would publicly deliver its decision on whether to grant an emergency stay of execution "as soon as possible".

READ MORE: Pakistan army sentences Indian 'spy' to death

According to Islamabad, Jadhav confessed to being tasked by India's intelligence service with planning, coordinating and organising espionage and sabotage activities in Balochistan province "aiming to destabilise and wage war against Pakistan".

Mittal, the Indian official, said the charges against Jadhav were "concocted" and his trial "farcical”.

He insisted Pakistan has failed to respond to all Indian demands for information about the case, snubbing requests for documents, including the charge sheet.

But Faisal, the Pakistani representative, argued that consular access is not an absolute right under the Vienna treaty.

Pakistani lawyer Khawar Qureshi also told the court that a 2008 bilateral agreement between Pakistan and India allows either country to decide on consular access in cases involving "political or security" issues.

Jadhav was arrested in Balochistan in March last year, according to Pakistan, but New Delhi insists he was kidnapped from Iran, where he was running his business.

Faisal also showed the court a picture of a passport which he said was found in Jadhav's possession bearing a completely different "and Muslim" name.

"India has been unable, or perhaps unwilling, to provide an explanation for this passport which is the most obvious indication of covert and illegal activity," added Faisal.

The case has highlighted the recent sharp uptick in tensions between the neighbouring nuclear-armed rivals, with the two sides outlining starkly different accounts.

The ICJ is the United Nations court for resolving disputes between nations, and its decisions are final and binding. However, it has no means to enforce its rulings and they have occasionally been ignored.

In a similar dispute over the Vienna Convention in 1999, the ICJ ordered the United States not to execute a German national who did not get proper consular assistance - but the man was put to death regardless.