Islamabad, Pakistan - Pakistan has summoned its ambassador to India "for consultations", according to its foreign ministry, as tensions remain high between the nuclear-armed South Asian neighbours.

The move came on Thursday amidst a flurry of allegations by both sides, accusing each other of harassing diplomats in their respective capitals.

Earlier this week, Pakistan said at least three of its diplomats had been harassed in New Delhi, and several of their children had been intimidated and threatened on their way home from their school.

New Delhi accuses Pakistan of having carried out an equivalent campaign of harassment against its own diplomats posted in Islamabad, alleging that Pakistani spy agency personnel entered the embassy's residential compound.

"Our High Commissioner in New Delhi has been asked to come to Islamabad for consultations," Muhammad Faisal, Pakistani foreign ministry spokesperson, said at a press briefing on Thursday.

Ambassador Sohail Mahmood will return to Islamabad immediately, after Pakistan's protests lodged with the Indian foreign ministry did not yield any results, Faisal said.

"We will take all possible steps for the safety and security of our people in India, which is paramount to us."

No permanent recall

India's government said the ambassador's trip home was routine and did not constitute a permanent recall, in comments to local media.

"Consultations by any resident ambassador or high commissioner with their headquarters are matters for that country," Raveesh Kumar, Indian foreign ministry spokesperson, told the New Delhi-based The Hindu newspaper.

"We, of course, have no comments on the Pakistan High Commissioner."

In a statement released late on Tuesday, the Pakistani foreign office said Pakistani officials and their families were facing "intense harassment, intimidation and outright violence from the Indian state agencies".

India said it would investigate the allegations.

Indian diplomats posted in Islamabad, the Pakistani capital, alleged to Al Jazeera on Wednesday that they had been facing similar harassment for months.

"Aggressive surveillance, violation of physical space and tailing of officers in close and dangerous proximity is a perennial issue," said an Indian foreign ministry official, on condition of anonymity.

"[Intelligence agency] personnel keep shooting videos of the officers, thrusting phones on their faces. Obscene phone calls and messages are constantly received on phones."

Tit-for-tat

The South Asian neighbours, which have fought three wars since gaining independence from the British in 1947, regularly trade tit-for-tat allegations of harassment and espionage against diplomats.

In 2016, Pakistan expelled an Indian diplomat for allegedly violating "established diplomatic norms", a euphemism commonly used to imply espionage.

That followed a day after the detention and expulsion of a Pakistani diplomat by India on similar charges.

Tensions between the nuclear-armed neighbours have been high for years, with India taking Pakistan to the International Court of Justice last year, alleging mistreatment of Kulbhashan Jadhev, an Indian citizen convicted by a Pakistani military court for spying and orchestrating attacks on Pakistani soil.

Pakistan has said Jadhev is a serving Indian naval officer who works for India's intelligence service, orchestrating attacks across southwestern Pakistan. India has denied this is the case.

The two countries also regularly exchange fire across the Line of Control, the de facto border in the disputed northern region of Kashmir, which both claim in full but administer separate portions of.

The shelling has killed several civilians on either side of the line of control since last year.

Follow Al Jazeera's Asad Hashim on Twitter @AsadHashim