Sharlow, with two sixes and 20 fours in his unbeaten 150, shared two significant partnerships, initially 171 with Welch (104) and then 150 with Alex Vincent (49) as South Wilts posted 339-7 in 40 overs.
With Adam Davison scoring 136, Purton hit back hard and eventually needed two runs to win off the last ball, which George Nash arrowed through the stumps of Cavan Bramwell (37) to give South Wilts a one-run win. Purton closed an agonising 338-7.
South Wilts scorer Adrian James completed a marathon day with the books, starting at 10am with the U13s and not finishing until 7.10pm when stumps were drawn on the Purton thriller.