They needed six runs off the last over bowled by Dawlat Zadran and one off the last delivery, initially declared a wide but later deemed to be a no-ball.
Hafeez anchored Pakistan's nervy run-chase, finishing with a 37-ball 42 not out while opener Ahmed Shehzad scored 35 and Umar Akmal a fiery 23-ball 28.
"Credit goes to them (Afghanistan) for stretching the match to the last over," said Hafeez in his post-match comments late Sunday.
buy fildena online buy fildena online no prescription
"They have earned their place with hard work which is paying off and I am sure they will learn from their mistakes."
Afghanistan have established their status as one of the best associate sides in the International Cricket Council by qualifying for their third successive World Twenty20, to be held in Bangladesh next year.
They also achieved their first qualification for the 50-over World Cup, to be jointly hosted by Austra