A Pakistani border official said hundreds of trucks have crossed into Afghanistan from Pakistan after the border reopened for the first time in more than a month, ending the protracted closure of one South Asia's busiest trade routes.

Fayaz Khan at the Torkham border crossing said Prime Minister Nawaz Sharif's order to open the border was received late on Monday. As a result, the border opened for business at 7am on Tuesday, he added.

The long-stranded convoy of trucks that stretched for miles on either side began to move.

Pakistan closed the border in mid-February, following a string of militant attacks that Islamabad has blamed on militants hiding in Afghanistan.

Pakistan and Afghanistan often accuse the other of harbouring militants.