Lifted by a controlled 74 not out by Hashmatullah Shahidi and a quickfire 49 from Hazratullah Zazai, the Blue Tigers chased down Pakistan’s total of 262 to win by three wickets in a timely boost before the World Cup starts on Thursday.
For Afghanistan, still searching for peace after decades of war, the victory was especially sweet because it came against Pakistan.
Many Afghans accuse their neighbour of supporting the Taliban and fuelling instability in their country, a charge which Pakistan, for its part, denies.
As the match concluded, automatic gunfire rang out across Kabul as fans rushed into the streets of the Afghan capital in now a familiar celebration of cricket success.
The rise of Afghan cricket has been a remarkable by-product of the decades of turmoil that forced millions into refugee camps across the border in Pakistan, where young men uprooted from home and with little to occupy them learned the sport.
On social media, politicians set aside brawls in parliament and bitter accusations of corruption, incompetence and nepotism to hail the team under Gulbadin Naib who hope to make the semi-finals.
“We, the Afghans, defeated Pakistan in cricket,” tweeted Amrullah Saleh, a former intelligence chief now running on President Ashraf Ghani’s team for elections in September.
“Yes it happened this evening and a massive mark was registered in history.”
Similar messages came from a range of other officials and political figures.
In a sporting concession, Gen. Asif Ghafoor, the powerful head of the Pakistani military communications wing, sent a tweet saying “Well played Afgan Cricket Team”.
Amid the congratulations, there was also criticism of the gunfire which regularly greets sporting success.
“Celebrating with gunfire is a shame, those who are interested in gunshots can join ANDSF, we need them on the battlefield,” said Abdul Moqim Abdulrahimzai, a senior official in the interior ministry, referring to the Afghan National Defense and Security Forces.