Substitute Saad Ullah scored the winner for the home side just 10 minutes after coming off the bench in front of a small but lively crowd in the eastern city of Lahore.
The two teams last met in the Afghan capital in 2013, the first football international between the sides in 30 years.
Afghanistan won that day 3-0, at a canter but there was no repeat on Friday as Pakistan edged a scrappy encounter played on a rather patchy pitch.
Muhammad Riaz opened for Pakistan before Afghan striker Amiruddin Anwar levelled on 57 minutes.
The win for Pakistan came without star players Mohammad Adil and Kaleemullah, who were on club duty for FC Dordoi in Kyrgyzstan.
COMMENTS (1)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ