KHYBER AGENCY - A Pakistani army major died on Tuesday after being shot by Afghan forces in a border clash, the military said, a development likely to ratchet up tension between the neighbours who sources said were beefing up troop numbers on either side.

The main gates at Torkham, the most frequented official border crossing at the end of the Khyber Pass, stayed closed for a third day, leaving thousands stranded on either side.

The security sources said Major Ali Jawad Changezi along with two other colleagues sustained bullet wounds in unprovoked firing of the Afghan soldiers Sunday night.

He received a bullet in his chest and was shifted to Combined Military Hospital (CMH) Peshawar where he embraced martyrdom on Tuesday.

Army Chief General Raheel Sharif attended funeral prayers on Tuesday for Major Jawad Ali Changezi, who was among nine Pakistani and six Afghan troops wounded in the fighting, security officials said.

Prime Minister Nawaz Sharif's office and the Pakistani military's press wing also confirmed Changezi's death.

Later, Pakistani military transported tanks and other military armour vehicles to the bordering area and additional troops were deployed on the border to tackle any situation.

Curfew was lifted and after a day’s closure, Landi Kotal bazaar was reopened for public. Inspector General Frontier Corp (IGFC) Major General Shaheen Mazhar had an aerial inspection of the area and examined the security measures on the border.

"This gate (is) considered essential to check and verify documentation of all border crossers," Asim Bajwa, chief spokesman for the Pakistani military, said on social media website Twitter on Monday.

Afghanistan summoned the Pakistani ambassador on Tuesday to register its protest at the violence, Afghanistan's foreign ministry said. Pakistan had similarly summoned the Afghan charge d'affaires in Islamabad on Monday, the Pakistani foreign office said.

On Monday, an Afghan border police commander also confirmed that reinforcements had been deployed to the Afghan side of the border.

In Afghanistan's eastern city of Jalalabad, more than a thousand mourners attended funeral prayers on Tuesday for the dead Afghan soldier. Angry protesters chanted "Death to Pakistan". Hundreds of demonstrators burned Pakistani flags at another protest in the southern Afghan city of Lashkar Gah.

According to AFP, two Afghan policemen were killed in gunfights since Sunday, said Mohammad Ayub Hussain Khil, border police chief in eastern Afghanistan. "The firing continued till 7:00 am (Tuesday). The border is now closed until the tension subsides," he told AFP.

The Pakistani military justified the construction of the gate at Torkham, saying "terrorists" were using the busy crossing point. "In order to check movement of terrorists through Torkham, Pakistan is constructing a gate on (our) own side of the border as a necessity to check unwanted and illegal movement," the military said in a statement.

Torkham is one of the major crossings between Afghanistan and Pakistan, where hundreds of trucks and thousands of people cross the border daily through the Khyber Pass.

The border was closed over similar clashes last month, but was reopened after an understanding was reached between the two countries.

According to a private TV channel, two more soldiers injured in Afghan troops firing across border on Tuesday night.