Afghanistan's players celebrate their victory (CricketEurope/ICC)
Afghanistan won the ICC World Cricket League Division Five final in Jersey - but only after a gallant brave rearguard action from the hosts.
Jersey looked set for an embarrassingly one-sided defeat after being bowled out for just 80 on home soil at Grainville.
Four wickets from Ryan Driver then reduced the Afghans to 42-7.
But the visitors kept their nerve, Hasti Gul hitting an unbeaten 29 to see his side home to a dramatic two-wicket victory on 81-8.
Home captain Matthew Hague told BBC Radio Jersey: "The main aim was getting to Tanzania and we did that yesterday.
"It would have been nice to have won but well done to Afghanistan".
Afghanistan coach Taj Malik said: "My bowlers did a tremendous job in the morning to restrict Jersey to only 80 runs. But the Jersey bowlers came back and put pressure on my team."
Malik also pointed out that the Afghan victory was about more than just winning for the team.
"This is a wonderful historic day for Afghanistan," he said. "This is a very big gift to my nation who only see war and violence.
"Now they will be happy when they receive this trophy in Kabul. They will all be waiting for this success. Afghanistan Champion!"
Both sides had already won promotion to WCL Division Four, just by making the final. But their new respective positions of numbers 29 and 30 in the ICC world cricket rankings were not decided until after a gripping game of cricket.
Jersey's hopes always looked slim after slumping to 25-4 early on as the Afghan spinners took control, Hamid Hassan leading the way with 4-27.
But Jonny Gough (23) and Steve Carlyon (17) gave them something to bowl at in a 42-run fifth-wicket partnership.
And, although the final five home wickets fell for just 13 runs, Jersey then made amends with the ball.
Former Worcestershire player Driver took 4-26 as, triggered by a needless run-out, the Afghans collapsed themselves to 42-7.
But then Gul came to the rescue, seeing his side home to win a breathtaking contest.