After weeks of trading charges regarding the harassment of each other’s diplomats, India and Pakistan announced on Friday that they had agreed to resolve the matter in line with the provisions of a 1992 pact on the treatment of officials posted at diplomatic missions.“India and Pakistan have mutually agreed to resolve matters related to the treatment of diplomats and diplomatic premises in line with the 1992 ‘Code of Conduct for the treatment of diplomatic/consular personnel in India and Pakistan’,” said a brief statement issued by the external affairs ministry.A similarly worded statement was issued by the Foreign Office in Islamabad. The two sides began accusing each other of harassing and ill-treating diplomats early this month, taking bilateral ties to a fresh low and adding to tensions. The allegations came soon after the two countries announced on March 7 that they would work for the speedy release of women, elderly and mentally challenged prisoners from each other’s jails.Officials familiar with the latest developments said the agreement on the issue of diplomats had been hammered out following meetings between the envoys of the two countries with the foreign secretaries. Though Pakistan had recalled its high commissioner Sohail Mahmood for consultations at the height of the spat, his return to New Delhi for the Pakistan Day celebrations on March 23 was an indication that things were moving in the right direction, the officials said. Pakistani officials had indicated to journalists on March 23 that they were hopeful of the matter being resolved within a week. The 1992 Code of Conduct facilitates the “smooth and unhindered functioning” of diplomatic and consular officials of the two countries in conformity with international laws and without violating their “privileges and immunities”.The Code states that the two sides will not resort to “intrusive and aggressive surveillance and actions such as verbal and physical harassment, disconnection of phone lines, threatening phone calls, pursuit in cars and unauthorized entry into residences”.The spat began after Pakistani security agencies reportedly stopped work on a residential compound being built by India for its officials within the diplomatic enclave in Islamabad. This was followed by allegations from both sides of the harassment and tailing of diplomats and military attaches. India submitted more than 15 notes verbale or semi-formal communications to Pakistan’s Foreign Office regarding the harassment of officials and their families. It also asked Pakistan to ensure the safety and security of officials at the Indian mission in Islamabad, saying were facing “intimidation”.Pakistani officials said there had been close to 50 instances of harassment and intimidation of their diplomats since March 7.