The 31-year-old batsman held Surrey's first innings together long enough on the final day to prevent the visitors from gaining an unlikely victory.
However, had it not been for some bizarre tactics from Gloucester's skipper Alex Gidman the game could have ended in a different result.
With the second and third day virtually washed out without a ball being bowled Surrey went into the final day on 18-3, looking for batting points after Gloucestershire had made 333 in their first innings.
However, the Brown Caps soon found themselves in a position where nothing other than saving the game would be possible.
Jonathan Batty who was bowled off his inside edge by the impressive Steve Kirby for 11 before James Benning was trapped in front by Kirby for a 10 ball duck, leaving Surrey flailing on 35-5.
This soon became 46-6 when Chris Jordan pushed at a delivery from James Franklin and was caught by Craig Spearman for seven.
Chris Schofield looked to counter attack and eased the pressure with a quick-fire 29 but after he fell in the first over after lunch wickets continued to fall with only the imperious Afzaal holding things together.
But when Afzaal fell, trying to find the 30 runs required to avoid the follow on with only Jade Dernbach left with him Surrey were asked to bat again with at least 47 overs still to play.
Then came a very bizarre piece of captaincy. Two early wickets, Laurie Evans nicking one through to Steve Snell attempting to leave the ball for nine and Matthew Spriegal caught at slip for four off Chris Taylor, had left the Brown Caps in crisis.
But instead of attacking with his best bowlers and trying to force victory by exposing Surrey's inexperienced lower middle order Gidman let them off the hook.
It seemed the Gloucestershire man was more concerned with improving his sides poor over rate and bowled part time spinners, missing the chance of getting something special out of the game.
For Surrey seven points was something to take out of the match but considering they were playing an opponent who had not won a first class game for more than a year it is little to excite members looking to see a promotion challenge this year.
They only won one session, when Andre Nel and Jade Dernbach ripped through the away sides middle order with the second new ball on the final session of day one when Gloucester were looking to build a score over 500.
Much improvement is required in their second game against Derbyshire which was due to start yesterday at the County Ground.