Representatives of the Afghan government and Taliban insurgents met in Doha for talks as violence raged in their country with foreign forces almost entirely withdrawn.

The two sides have been meeting on and off for months in the Qatari capital, but the talks have lost momentum as the insurgents made battlefield gains.

Several high-ranking officials, including former Afghan former chief executive Abdullah Abdullah, gathered in a luxury hotel on Saturday after morning prayers.

They were joined by negotiators from the Taliban's political office in Doha.

A delegation of Afghanistan's Taliban movement attends a session of the peace talks between the Afghan government and the Taliban in the Qatari capital Doha

Former president Hamid Karzai had also been due to travel to Doha but remained in Kabul, according to a source.

US special envoy on Afghanistan Zalmay Khalilzad was present as the two sides began to meet.

Spokeswoman for the Afghan government negotiating team Najia Anwari said: "The high level delegation is here to talk to both sides, guide them and support the (government) negotiating team in terms of speeding up the talks and have progress."

"We expect that it (will) speed the talks and... in a short time, both sides will reach a result and we will witness a durable and dignified peace in Afghanistan," she told AFP.

The sides were meeting behind closed doors after a brief interaction with the media.

The Taliban have capitalised on the last stages of the withdrawal of US and other foreign troops from Afghanistan to launch a series of lightning offensives across the country.

"We are ready for dialogue, for talks and negotiations, and our priority is to solve the problems through dialogue," Taliban spokesman Muhamad Naeem told the Al Jazeera broadcaster ahead of the talks.

"The other side must have a true and sincere will to end the problems."

Talks between the government and the Taliban side led by Mullah Abdul Ghani Baradar began with Koranic recitations, Naeem tweeted Saturday.

"As we pursue our greater goals, we have to go beyond the details," Baradar said in his opening remarks.

For his part, Abdullah said: "We must denounce forcing our views upon each other and the people through unpeaceful means."

A key crossing between Pakistan and Afghanistan has partially reopened, after the Taliban took control of the Afghan side of the border.

A Pakistani border official, who did not want to be named, said small groups were being allowed into Chaman in Pakistan, while hundreds were heading into Spin Boldak in Afghanistan.

Pakistani people return from Afghanistan after crossing the border at Chaman

Pakistani Noor Ali, who had been visiting Kabul, said it took him two attempts to reach the border in recent days because of fighting in Kandahar province.

"I was scared, but the Taliban did not create any problems, they checked my documents and allowed me to go through," he told AFP after arriving in the nearby city of Quetta.

An AFP journalist witnessed people crossing in both directions.

The Taliban have also tightened their grip on the north, with clashes continuing in the stronghold of warlord Abdul Rashid Dostum that borders Turkmenistan.

The French government flew out around 100 of its citizens and Afghans working for the embassy from the capital, as security deteriorated, a French diplomatic source said.

Several other countries including India, China, Germany and Canada have flown out their citizens or told them to leave in recent days.

There have been weeks of intensifying fighting across Afghanistan, with the Taliban pressing multiple offensives and overrunning dozens of districts.

Paramedics treat men injured during fighting between Afghan forces and Taliban fighters

As fighting raged over large swathes of Afghanistan, a war of words was also heating up between Kabul and Islamabad, after the Afghan vice president accused the Pakistani military of providing "close air support to Taliban in certain areas".

Pakistan strongly denied the claim, with its foreign ministry saying the country "took necessary measures within its territory to safeguard our own troops and population".

Islamabad had touted a conference of regional leaders to address the spiralling violence.

Instead it announced it would delay the summit until after the Muslim Eid al-Adha feast, due to start next week at the end of the annual hajj pilgrimage, clearing the way for the Doha gathering.

Afghanistan's southern border has long been a flashpoint in relations with its eastern neighbour.

Foreign troops have been in Afghanistan for nearly two decades following the US-led invasion launched in the aftermath of the September 11, 2001 attacks.

With their departure, fears have been growing that Afghan forces will be overwhelmed without the vital air support they provide.