South Africa will need to chase 232 runs to claim victory in their World Cup clash against Pakistan via the Duckworth-Lewis method after bowling out Misbah-ul-Haq's side out for 222 in a reduced-overs match.
Shehzad was to depart for 18 when he was caught by Steyn off the bowling of Abbott in the ninth over with his side at 30-1.
Ahmed crashed three sixes in his innings of 49, and looked poised to register further blows before a mix-up between him and Khan caused his dismissal as he was run out by David Miller.
Khan guided his team past the 100-run mark, but began to find life difficult at the crease as South Africa's accuracy with the ball and speed in the field built pressure, which led to his departure at the hands of De Villiers for 37.
Rain delays hampered the fluency of the Pakistan innings as players struggled to get into rhythm in their batting. Misbah failed to find the boundary with regularity, while Sohaib Maqsood and Umar Akmal both mistimed shots to fall for eight and 13 respectively.
Shahid Afridi hit two huge sixes and offered some impetus when the innings was reduced to 47 overs due to the delays, but his stay at the crease was short as he made 22 off 15 deliveries before being dismissed by Steyn.
Misbah made his half-century off 73 balls, but the innings began to collapse around him as the Proteas finished Pakistan off for 222 as Morne Morkel claimed the final wicket, which leaves De Villiers's men chasing 232 off their 47 overs due to the Duckworth-Lewis method in Auckland.