The Torkham and Chaman crossings were to remain open through tomorrow for nationals from both countries with valid visas who want to return home, a measure intended to calm tensions and ease a backlog.
Nearly 5,000 Afghans left for their country and another 1,500 Pakistanis crossed in the opposite direction, said Fayyaz Khan, a Pakistani official at the Torkham crossing. He said overland trade between the two countries has yet to resume.
Pakistan shut the crossings three weeks ago after a wave of suicide bombings that authorities said was linked to Islamic militants based in Afghanistan. The two countries have long accused each other of ignoring al-Qaida and other militants who operate along the porous, mountainous border.
Khairullah Azad, the deputy spokesman for the Afghan Foreign Ministry, urged Pakistan to restore normal movement at the crossings, saying the two-day reopening was insufficient for people living on both sides of the frontier.
Meanwhile, at least two Pakistani soldiers and five militants were killed today in the northwestern town of Swabi during a raid on a militant hideout, the military said. It provided no further details, saying the fighting was still underway. The Pakistani Taliban claimed it attacked soldiers in Swabi.
Prime Minister Nawaz Sharif expressed his condolences over the "martyrdom" of soldiers and praised the armed forces for battling those who threaten the state.