Two security officials say Pakistan has reopened a main border crossing with Afghanistan that was closed earlier this week following clashes between the two sides over Pakistan's construction of a gate to curb illegal cross-border movement.

The officials say Torkham border reopened Saturday morning and that all those carrying valid travel documents are being allowed to cross.

Thousands of people have been stranded on both sides due to the border closure on Sunday, when Pakistan and Afghanistan began trading fire and two Afghan border guards and one Pakistani army officer were killed.

The officials spoke on condition of anonymity as they were not authorized to speak to the media.

The reopening is likely to ease tensions between the two countries, who have accused each other of initiating the violence.