Afghanistan endured a horrid start to the World Cup Qualifiers - losing their first three games in the group stages - and had all but given up hopes of qualifying for next year's World Cup.
Afghan captain Asghar Stanikzai, who had his appendix removed just before the qualifiers, took his side to victory with an unbeaten 39 off 29 deliveries.
It is a spectacular reversal of fortunes for Afghanistan. We felt we have done some really good things so far, we've obviously qualified for the World Cup, which was our first priority and obviously, coming into the final, it means a lot to us to finish off the tournament well and win it.
"First of all, congratulations to Afghanistan", he said.
Afghanistan benefited when tournament host Zimbabwe, the favorite with the West Indies to advance, choked on Thursday when it lost to associate side the United Arab Emirates. "We did half of it, but did not get over the line today".
Scotland, on the other hand, only have three scheduled games this summer - a one-day worldwide against England and two T20s against Pakistan - after their narrow defeat to West Indies in their rain-affected final qualifier.
Afghanistan have joined the Windies as the second qualifier from the Zimbabwe event and the two sides will now go head to head in the final at the Harare Sports Club on Sunday.
Lucas Browne should take stock after Dillian Whyte knockout, says Ricky Hatton
A high-stakes battle could be an exciting prospect, although Whyte will argue he has already done enough to earn a crack at Wilder.
Rovman Powell hit 44 as the two-time World Cup winners recovered to at least pass 200. Their inability to take control of the proceedings is evident from the fact that they played a total of 174 dot balls and scored only 102 runs in the last 20 overs, including 66 runs for the loss of three wickets in the last 10 overs.
"I don't think we have played the ideal game as yet".
In reply, burly opener Mohammad Shahzad clobbered 54 off 50 balls in an opening stand of 86 with Gulbadin Naib.
While disappointed, captain William Porterfield was also concerned about the future of the other teams who missed out, fuelling debate about the International Cricket Council's move to reduce the Cricket World Cup to 10 teams from 14. We had opportunities but we lost three games.
"This is nothing but a miracle that we have won this tournament", added Stanikzai, whose team will also play their maiden Test match against India in Bangalore in June.
The match will be Niall O'Brien's 100th ODI for Ireland while Rashid Khan will be looking to claim four wickets to become the quickest bowler to 100 wickets in the 50-over format.
- How to Celebrate Earth Hour in Monaco
- Rajya Sabha polls: SP cancels victory celebration after BSP loss
- Justin Bieber Follows Selena Gomez's Body Shamers Instagram With Adorable Video
- China urges calm amid worldwide expulsion of Russian diplomats
- Argentina coach Sampaoli tribute to Barcelona star Messi
- Karen McDougal's message to Melania Trump: 'I'm sorry'
- Wife jailed after smacking husband in head over forgetting anniversary
- Changes Made For Season 2 Of '13 Reasons Why'
- President Trump threatens to veto $1.3 trillion spending bill
- Students speak out at 'March for Our Lives'