England closed day three of the first Test against Sri Lanka in Galle on 111 for two having been set 340 to win having fought hard to remain in contention.
They eventually dismissed Sri Lanka for 214 in their second innings before losing the wickets of openers Andrew Strauss (27) and Alastair Cook (14).
Sri Lanka might have been all out for 168, the score on which Stuart Broad had Prasanna Jayawardene caught and bowled off a no ball, but he went on to make 61 not out in 123 balls to frustrate the tourists.
Graeme Swann returned figures of six for 82 and England's fightback continued as Kevin Pietersen and Jonathan Trott forged an unbeaten stand worth 63 in 129 balls for the third wicket.
England began the day strongly as Monty Panesar had Dinesh Chandimal (31) caught by Pietersen and one run later, Graeme Swann trapped Suraj Randiv in front for 18.
Rangana Herath was then bowled by Swann for seven before Jayawardene and Chanaka Welagedara (13) added 40 runs for the ninth wicket.
Panesar broke that when he had Welagedara caught by Strauss and with no addition to the score, England gave Jayawardene his reprieve.
He went on to hit a total of three fours and three sixes in his innings that spanned 123 balls and the Sri Lankan innings finally ended when Suranga Lakmal (13) was run out trying to get Jayawardene back on strike.
England then made a similarly positive start in pursuit of a stiff target as both Cook and Strauss scored early boundaries with powerful cut strokes and although they made it to tea unscathed, both lost their wickets in the final session.
Cook was caught by Jayawardene behind the stumps as he edged an attempted flick off Herath and Strauss clipped the same bowler to Tillakaratne Dilshan at midwicket.
Trott then reached an unbeaten 40 in 96 balls and Pietersen was not out on 29 from 59 balls when stumps were drawn.
Mahela Jayawardene's majestic 180 over the opening two days put Sri Lanka in a good position before Herath took six for 74 to bowl England out for 193 in reply.
© Cricket World 2012
Open an account with bet365 today and qualify for up to £200 in free bets with our fantastic 100% Deposit Bonus.