|Second one-day international, Mirpur:|
|South Africa 162 (46 overs): Du Plessis 41, N Hossain 3-26, Mustafizur 3-38|
|Bangladesh 167-3 (27.4 overs): Sarkar 88 not out, Mahmudullah 50|
|Bangladesh won by seven wickets|
Bangladesh have secured their place at the 2017 ICC Champions Trophy after beating South Africa in their second one-day international in Mirpur.
The eight-team event will feature hosts England plus the top seven other teams in the International Cricket Council's ODI rankings on 30 September this year.
The battle for the final place will now be between West Indies and Pakistan.
South Africa were bowled out for 162 in 46 overs, and the Tigers chased down their target with 22.2 overs to spare.
The result levels the series at 1-1, with the third and final game in Chittagong on Wednesday.
The Proteas had won the toss but were kept in check as only Faf du Plessis (41) and Farhaan Behardien (36) passed 25, while the top order collapsed to 93-5.
Rookie left-arm seamer Mustafizur Rahman (3-38) and spinner Nasir Hossain (3-26) did the damage as South Africa recorded their lowest ODI total against the Tigers.
Despite losing opening partner Tamim Iqbal cheaply, Soumya Sarkar anchored Bangladesh's reply with an unbeaten 88 from 79 balls.
Sarkar added 135 for the third wicket with Mahmudullah (50) and completed the win in style by smashing leg-spinner Imran Tahir for six over mid-wicket.
Even if Bangladesh lose on Wednesday, it is no longer possible for both West Indies - who won the event on English soil in 2004 - and Pakistan to pass their points tally before the September cut-off point.
Pakistan have just begun a five-match series in Sri Lanka, while they will meet West Indies in a triangular ODI series also featuring hosts Zimbabwe in August and September.
|Teams qualified for ICC Champions Trophy 2017|
|England (hosts)||South Africa|
|New Zealand||West Indies OR Pakistan|