England nearly wasted a flying start before eking out a five-wicket victory in the rain-shortened third one-day international against Sri Lanka in Hambantota on Wednesday.
Kumar Sangakkara made a cultured 63 and Lahiru Thirimanne chipped in with a brisk unbeaten 62 to help Sri Lanka post 242 for eight in 35 overs.
Chasing a revised target of 236 from 35 overs under the Duckworth-Lewis method, England got off to a fast start with Moeen Ali (58) flaying the Lankan attack before a typical mid-innings wobble.
But Jos Buttler blasted a quickfire 55 not out and added 84 runs off 64 balls with Joe Root (48 not out) to see the touring side home with eight balls remaining.
Colombo hosts the fourth ODI on Sunday with Sri Lanka leading the series 2-1.
Sangakkara top scored for Sri Lanka
Opting to bat first, Sri Lanka were six for one from two overs when rain halted play, eventually reducing the match to 35-overs-a-side.
They slumped to 31 for three but, in his 386th one-day international, Sangakkara added 87 runs with Angelo Mathews (37) to steady the innings.
Mathews fell trying to accelerate but Sangakkara could not be denied his 80th one-day fifty which also took him past the 13,000-run mark in this format.
Chris Woakes (3-41) and his colleagues restricted Sri Lanka to 180-6 in 30 overs before the hosts broke loose in the final five overs which yielded 62 runs.
Moeen gives England an ideal start
Free-scoring Moeen led England's reply, adding 84 runs with his captain Alastair Cook (34) and the visitors reached the 100-mark in the 14th over.
Even the balls Moeen did not quite middle raced to the boundary and it took an almighty mix-up with Hales to send him back.
Non-striker Hales initially agreed to a single before changing his mind, cutting short Moeen's 40-ball blitz which included five sixes and two fours.
The needless run-out threatened to turn the match on its head as England lost three quick wickets before Buttler and Root mixed caution with aggression to see them home.