Vijay Gokhale said the peace deal must not leave ungoverned spaces for terrorists to take advantage.

As the US and the Taliban close in on a deal, India on Monday said it has always supported a peace settlement in Afghanistan which will ensure stability and not leave ungoverned spaces for terrorists or their proxies to take advantage of.

Foreign Secretary Vijay Gokhale, while briefing the media on Prime Minister Narendra Modi's visit to Russia this week, said that both India and Russia believe that whatever the outcome of the discussions between the US and the Taliban is, they hope to see a stable political situation.

India and Russia want to see a situation in Afghanistan where there is political order and where the peace agreement or the post-agreement process will hold.

"By and large, we have been on the same page with Russia on the issue We are in touch with each other," he said.

On what sort of representatives India would send if invited for talks on Afghanistan, Mr Gokhale said he does not want to speculate on it.

Asked if India and Russia feel the US-Taliban talks were legitimate considering the government was not part of negotiations, Mr Gokhale said: "We support all peace initiatives. We have been a part of all of them and in some cases when we were not part of them initially we have been supportive of them."

"Our issue has been what is the post-settlement situation. In that regard, our situation has been clear, we support a system which has constitutional legitimacy, which has a political mandate, which will ensure stability and most importantly not leave ungoverned spaces for terrorists or their proxies to take advantage of," he said.

Zalmay Khalilzad, the US envoy leading efforts to forge a deal with the Taliban, has spent about a year meeting with the Taliban in Doha in a series of talks aimed at ending America's 18-year-old war in Afghanistan.

The deal which is closer to being clinched centres on a US troop withdrawal in return for several security guarantees from the Taliban, broader peace talks between the insurgents and the Afghan government, and an eventual ceasefire.