Bangladesh moved into second place in the Zimbabwe Twenty20 Triangular Series table after beating South Africa by three wickets in Harare.
The Asian side must now hope for a Zimbabwe win over the Proteas on Saturday, with the top two sides progressing to Sunday's final.
The Bangladesh spinners kept South Africa in check, limiting them to 129 for seven before passing that total in their reply with a ball to spare.
Ziaur Rahman's boundary sealed the win off the bowling of Chris Morris, to finish with 27 runs off 26 balls.
Opener Mohammad Ashraful had earlier smashed a run-a-ball 40, which included six fours, and Mahmudullah weighed in with 28 lower down the order.
Marchant de Lange took three for 25 for the South Africans, who failed to convince against Bangladesh's spin on a sticky pitch at the start of the day.
Faf du Plessis fell for 13 off Elias Sunny and Mahmudullah removed Colin Ingram for one by claiming a return catch.
Only Justin Ontong, with 41 off 36 balls, truly impressed for South Africa.