Proteas beat the Men-In-Blue by five wickets to narrow their defeat margin to 1-3 in the six-match series.