Torkham and Chaman crossings on the Pak-Afghan border opened for the second day on Wednesday as thousands of stranded Afghans and Pakistanis crossed into their respective countries.

The Pakistan government had decided to close the border last month amid a string of deadly militant attacks which the military leadership claimed were carried out by militants operating from safe-havens in Afghanistan.

The border was temporarily reopened for two-days on Tuesday in a bid to to ease tensions between the two neighbours and relieve some of the backlog of people and vehicles at the crossings.

Over 12,500 Afghan nationals crossed the border to return home on Tuesday, Radio Pakistan reported.

According to the state-run daily, 450 Pakistanis have returned to their country via Torkham border check-post since the border opened on Tuesday.

According to Pakistani officials, hundreds of Afghans and Pakistanis with valid travel documents are now allowed to cross through the Torkham crossing in the northwest or the Chaman in the southwest.

The two are major arteries for trade and commerce, though there are other crossings which are less in use and which will remain closed.

Fayyaz Khan, a government official at Torkham, told The Associated Press that 550 Afghans crossed over since the crossing was opened at 7am.

About 150 Pakistanis also returned home, he said, adding that “so far, no trade activity between Pakistan and Afghanistan has resumed.”

Hukam Dad, a security official at Chaman, said hundreds of Afghans were crossing there as well and that Pakistanis were returning amid tight security.

Islamabad sought to use the closure as a tool to try and pressure Kabul to act against militants with sanctuaries across the border.

Afghan Ambassador Omar Zakhilwal had last week asked the Pakistani government to reopen the border.

The reopening came a day after Pakistan said a group of militants attacked military posts after crossing over from Afghanistan into the Mohmand tribal region, triggering gun battles that killed six soldiers and 10 attackers.

Islamabad officially complained to Kabul over the attack, demanding that Afghanistan take action against armed groups. A spokesman for the provincial governor in Afghanistan's Nangarhar province, Attaullah Khogyani, said the Pakistani allegations were baseless.