Gaurav Thakur
A sea of Bangladesh supporters flocked to the New York Stadium as SA won the toss and decided to bat first.
Tanzim Hasan Sakib picked three wickets in the powerplay to push the Proteas on the backfoot right from the start.
Bangladesh picked up four wickets in the powerplay and restricted SA to just 25 runs.
For the second consecutive match, David Miller provided stability to SA innings this time alongside Heinrich Klaasen.
At 100/3 in 17 overs, SA looked set to go big but Bangladesh pulled it back dismissing Miller and Klaasen to stop SA at 113/7.
Bangladesh lost just one wicket in powerplay but scored only 25 runs in pursuit of the 114-run target.
Litton Das, Shakib Al Hasan and Najmul Shanto were all dimissed by the tenth over and SA came right back in the game.
In form Towhid Hridoy combined with Mahumudullah to reduce the equation to 20 needed from last 18 balls.
Hridoy was dismissed by Rabada on the first ball of the 18th over and the game turned around quickly after that.
With six needed from two, Mahmudullah launched Keshav Maharaj towards the long-on fence only to be caught meters short from boundary.
SA defeated Bangladesh by four runs as Keshav Maharaj held his nerves to defend 11 in the last over.
Bangladesh now play Netherlands on June 13 and the winner of that match could become the favourite to advance to the next round.