Pakistan's defence minister and spy chief were in Kabul Wednesday for talks with the Taliban government, days after Islamabad blamed Afghanistan-based militants for deadly recent attacks.

The main border crossing between the two countries has been closed since late Sunday, with a gun battle erupting the next morning that each side blamed the other for starting.

Pakistan accuses the Afghan Taliban of harbouring militants from its own home-grown version of the Islamist group, a charge Kabul denies.

Afghan officials said Wednesday deputy Prime Minister Abdul Ghani Baradar met Pakistan Defence Minister Khawaja Muhammad Asif and Nadeem Anjum, head of the Inter-Services Intelligence agency.

They discussed "bilateral relations, trade, regional connectivity and economic cooperation between the two countries", Baradar's office said.

Pakistan's foreign ministry confirmed the visit, saying "security related matters including counter-terrorism measures" would be discussed.

Pakistan has seen a dramatic increase in militant attacks, mainly in border regions, in the year-and-a-half of Taliban rule in Afghanistan.

However, a suicide squad also stormed a police compound in the southern port city of Karachi last Friday, killing five people.

A suicide bomber killed more than 80 police officers at a mosque in Peshawar, the provincial capital of Khyber Pakhtunkhwa, in January.

Both attacks were linked to Tehreek-e-Taliban Pakistan (TTP), which has deep ties with the Afghan Taliban.

The border crossing at Torkham, a key crossing point for goods and people, remained closed Wednesday.

Officials on both sides said Afghan authorities closed the border late Sunday after Pakistan imposed new rules preventing entry to those accompanying medical patients without the right documentation.

Gunfire erupted the next morning, with both sides blaming the other for the violence.

Also at the weekend, Pakistan Foreign Minister Bilawal Bhutto Zardari told the Munich Security Conference that Afghanistan had to deliver on promises not to harbour militants.

"There's a whole alphabet soup of terrorist organisations that have and still do base themselves out of Afghanistan," he said.

Kabul's foreign ministry spokesman Abdul Qahar Balkhi said in response Zardari's remarks "are untrue".