The remote city of Dunedin in south New Zealand secured an unlikely place in Afghan hearts on Thursday as it became the setting where Afghanistan sports history was made.

In the University Oval, a world away from Kabul, Afghanistan won its first match at a Cricket World Cup, defeating Scotland in the most thrilling contest of this year’s tournament, with just three balls left and the last two batsmen at the crease.

When...