ISLAMABAD - Afghanistan and Pakistan have traded charges of harassment of their diplomats serving in each other's capitals, prompting Islamabad to halt its consular operations in Kabul until further notice.

The latest diplomatic dispute between the neighbors erupted Sunday when Pakistan complained that its diplomatic staff, while going to work this week, had been "obstructed on the road and the embassy vehicles were also hit by motorcycles" in the Afghan capital.

Pakistan's Foreign Ministry said it had summoned the Afghan chargé d'affaires to convey Islamabad's concerns over the safety and security of Pakistani diplomats, demanding Kabul immediately probe the "security violations and harassment incidents."

The Afghan Foreign Ministry, while responding to Pakistan's complaints Monday, vowed it would "seriously investigate" them. At the same time, however, it alleged the Afghan ambassador in Islamabad was "mistreated" by the Pakistani spy agency.

"Afghanistan expresses its deepest objection and concern over the summoning of the ambassador by Pakistan's Inter-Service Intelligence (ISI) and the misconduct of the entity's personnel," the ministry said, leveling an extremely rare allegation. It did not elaborate.

There was no immediate reaction from the Pakistani government to the accusations.

People gather outside of the Pakistan Embassy in Kabul, Afghanistan, Nov. 4, 2019.

Pakistan's decision to abruptly halt consular services in Kabul stranded hundreds of Afghans who arrived Monday morning at the embassy as usual to seek visas, many of them needing urgent medical treatment in relatively better-quipped hospitals in the neighboring country.

Apart from medical assistance, visa seekers want to travel to meet relatives, conduct trade and get an education in institutions in Pakistan, which also still hosts around 3 million Afghan refugees.

The Pakistani embassy in Kabul announced last week it had issued more than 450,000 visas to Afghan applicants in the last nine months at an average of 53,000 visas per month.

"However, there is still a large unmet demand for Pakistani visas, leading to long queues and waiting times for Afghan visa applicants," the mission noted in a statement.

Relations between Pakistan and Afghanistan have long been marred by mistrust and suspicions. They stem from allegations that leaders and fighters of the Afghan Taliban use sanctuaries on Pakistani soil to orchestrate and sustain insurgent activities in Afghanistan with the covert support of the ISI, charges Islamabad denies.