Hamilton's innings was the foundation for Scotland's win (pic: Ian Jacobs)
Scotland failed to qualify for the 2011 World Cup, but a 122-run victory over United Arab Emirates maintains their one-day international status.
The Scots needed victory in South Africa to secure ODI standing until 2013 but also required other results to go their way to reach the World Cup.
However, Kenya and Netherlands both won to dash Scotland's slim hopes.
Gavin Hamilton led the charge with a fine innings of 127 as Scotland reached an impressive total of 299 for seven.
Neil McCallum chipped in with 54, while Kyle Coetzer made 35 before he was run out.
Craig Wright, who added a quick-fire 25 runs from 13 balls, was the pick of Scotland's bowlers, taking four wickets for 41 from his 10 overs.
Only Nithin Gopal, with a knock of 50, offered any form of resistance as UAE fell well short of the mark.
Scotland, who featured in the 1999 and 2007 World Cups, arrived in South Africa among the favourites for the qualifying competition.
Failure to reach the main event is sure to lead to much soul searching, but a top-six finish has spared them the humiliation of losing their ODI standing.
The top six sides in South Africa also qualify automatically for the ICC Intercontinental Cup 2009-10 and this year's WorldTwenty20 qualifier.
Ireland, Canada and Kenya, all of whom beat Scotland in the tournament, make up the World Cup qualifiers, along with Netherlands.
On Sunday, Scotland will get the opportunity to avenge an earlier defeat by Afghanistan when they meet in a play-off for fifth place.
For 34-year-old all-rounder Hamilton, Scotland's failure to make the 2011 finals was of particular disappointment.
"Personally, it was more than likely going to be my last (World Cup)," he said.
"Myself and the team are bitterly disappointed at not qualifying.
"We set our stall out not just to qualify, but we wanted to get to the final, which was certainly more than achievable.
"I think the damage was done on Monday and Wednesday. It would have taken a miracle to qualify today.
"Today was the best we played by a country mile, albeit probably a little bit too late."