Pakistan temporarily reopened the two main border crossings with Afghanistan on Tuesday following the border's closure amid a string of deadly militant attacks.
The measure, which is to remain in place on Wednesday, seeks to ease tensions between the two neighbours and relieve some of the backlog of people and vehicles at the crossings.
According to Pakistani officials, hundreds of Afghans and Pakistanis with valid travel documents are now allowed to cross through the Torkham crossing in the north west or the Chaman in the south west.
The two are major arteries for trade and commerce but were closed last month.
There are other crossings which are less in use and which will remain closed.
Fayyaz Khan, a government official at Torkham, said 550 Afghans crossed over since the crossing was opened at 7am.
About 150 Pakistanis also returned home, he said, adding "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.
Pakistan shut the crossings three weeks ago after a wave of suicide bombings that authorities said was linked to Islamic militants from Afghanistan.
Islamabad has also sought to use the closure as a tool to try and pressure Kabul to act against militant with sanctuaries across the border.
The foreign ministry in Islamabad said it conveyed the decision to the Afghan Ambassador Omar Zakhilwal, who 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 Afghanistan take action against armed groups.
A spokesman for the provincial governor in Afghanistan's Nangarhar province, Attaullah Khogyani, said Pakistani allegations were baseless.
Meanwhile, at least two Pakistani soldiers were killed on Tuesday in the town of Swabi during a raid on a militant hideout, the military said.
It provided no further details and only said the exchange of fire was still under way.