KABUL (Reuters) - Pakistan reopened a major border crossing with Afghanistan on Saturday, officials said, more than three weeks after several people were killed when troops from both sides exchanged fire for hours.

FILE PHOTO - A man passes a road sign while pulling supplies towards the Pakistan-Afghanistan border crossing in Chaman November 28, 2011. REUTERS/Naseer Ahmed

The Chaman crossing into Afghanistan’s Kandahar province was reopened on “humanitarian grounds” after Afghan officials submitted a request, according to a statement by the Pakistani military.

“It has been agreed upon by Pakistan authorities that [a] ceasefire shall continue to be maintained and no border violation will be acceptable,” the statement said, noting that Pakistani troops will maintain positions along the border.

Zia Durani, police spokesman for Kandahar province, said the crossing had reopened after several days of negotiations.

“Now people from both countries with a valid visa can travel freely,” he said.

On May 5 Pakistan’s military said a census team - guarded by troops from its Frontier Corps (FC) - that was collecting population data in a village near the border town of Chaman came under fire and at least one person was killed and 18 wounded.

At the time, Durani said Pakistani officials were using the census as a cover for “malicious activities and to provoke villagers against the government”.

Landlocked Afghanistan depends heavily on cross-border trade with Pakistan, including international humanitarian aid for hundreds of thousands of people displaced by fighting and economic malaise.

Tension has been increasing in recent months with each side accusing the other of not doing enough to stop militants engaging in cross-border raids.

Last year, Pakistan started building a barrier at the main border crossing in the town of Torkham, near the Khyber Pass, angering Afghanistan, which has never formally recognized the colonial-era Durand Line border drawn up in 1893.