India has argued in the International Court of Justice that Pakistan violated international laws by not allowing it access to Kulbhushan Sudhir Jadhav.
Mr Jadhav was arrested in Balochistan in March 2016 and convicted last month.
India denies Mr Jadhav is a spy, and Pakistan denies kidnapping him.
Sitting in The Hague, the court rejected Pakistan's argument that it did not have jurisdiction over the case, and said it would hear the case and seek arguments from both sides.
"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 court has given its final decision," court president Ronny Abraham said on Thursday.
"India has the right to seek consular access for Jadhav," he added.
India's case had no substance, the Pakistani government said.
"In our submissions on 15 May, we had assured the court unambiguously that Commander Jadhav would be provided every opportunity and remedy available under the law to defend his case," a statement said.