A gun battle erupted Wednesday between Pakistan and Afghan border forces, officials said, shutting the busiest trade crossing between the two South Asian countries.

Afghanistan and Pakistan have had frosty relations since the Taliban returned to power in Kabul two years ago, with Islamabad accusing its neighbour of harbouring militants carrying out strikes on its soil.

Diplomatic tensions have been stoked by frequent flare-ups along their mostly mountainous frontier, including sporadic gunfights and crossing closures.

A local Pakistan police official said firing started at around 1:00 pm (0800 GMT) at the Torkham border crossing, halfway between Islamabad and Kabul, with an evacuation ordered.

"It is not clear who is firing but we are receiving fire from both light and heavy weapons. They are using mortars, too," said another local government official, adding one border guard had been wounded.

Irshad Mohmand, a local administration official, said the crossing was shut from the Pakistan side after a security dispute spiralled.

"Afghan forces tried to establish a check post in an area where it is agreed... that both sides will not establish a check post," he told AFP.

"After an objection from the Pakistan side, the Afghan forces opened fire," he said, adding that Pakistan border forces responded with "retaliatory fire".

An official on the Afghan side of the border -- speaking anonymously -- confirmed the dispute started over an outpost built by their border guards but said Pakistan's forces were the first to open fire.

He also confirmed the border was closed.

The crossing at Torkham is a key trading waypoint, where Afghanistan exports truckloads of coal and receives food and other supplies from Pakistan.

Both nations are in dire economic crisis, with Afghanistan reeling from a drop-off in aid following the end of the US-backed occupation, and Pakistan crippled by a domestic downturn and runaway inflation.

A gun battle also erupted at the crossing in February after Taliban authorities ordered the border shut, with both sides blaming the other for starting the firefight.