The main border crossing between Afghanistan and Pakistan was closed on Wednesday as security forces from both countries exchanged fire, Pakistani security sources said.

Local residents reported the sound of gunfire by the Torkham crossing and said people around the busy border area near the Khyber Pass had fled once the firing sarted.

Security officials from the area who spoke on condition of anonymity said Taliban and Pakistani forces had exchanged fire but there had not yet been any casualties.

A spokesman for the local government in Afghanistan's eastern Nangahar province, where the crossing is located, and a spokeswoman for Pakistan's foreign office did not immediately respond to request for comment.

Disputes linked to the 2,600 km (1,615 mile) border have been a bone of contention between the neighbours for decades.

The Torkham border point is the main point of transit for travellers and goods between Pakistan and landlocked Afghanistan.

The crossing has been closed several times in recent years, including a closure in February that saw thousands of trucks laden with goods stranded on each side of the border for days.

(Reporting by Mushtaq Ali; Additional reporting by Mohammad Yunus Yawar; Writing by Charlotte Greenfield, Editing by Alexandra Hudson)