Pakistani Prime Minister Nawaz Sharif ordered the two main border crossings with Afghanistan to be reopened on March 20, calling it a "goodwill gesture."
The border closures on February 16 had left hundreds of thousands of people stranded at the two major crossings of Torkham and Chaman.
Pakistan shut the Torkham crossing between Peshawar to Jalalabad and Chaman crossing between Quetta and Kandahar after more than 130 people were killed in a series of attacks by militants that Islamabad said resided in Afghanistan. Afghanistan denies harboring them.
The closures hit travelers and cross-border trade heavily, stranding thousands of vehicles on both sides of the border.
Haji Aslam, head of the Transit Union, representing drivers on both sides of the border, said some 4,000 trucks had been held up on the Afghan side of the border and 6,000 on the Pakistan side, where tons of fresh produce meant for export has rotted and been thrown away.
Sharif's decision to reopen the border came days after top diplomats from Pakistan and Afghanistan met in London for talks to address each other's concerns about alleged terrorist hideouts in the border regions.