England are keeping a thin grasp on the first Test in Galle, thanks to a partnership between Pietersen and Trott that took them to close of play on 111-2.
Earlier in the day, it took England until half an hour before tea to dismiss the Sri Lankan tail. Three wickets went to the spinners in the morning session, Swann achieving his 12th Test five-wicket haul, finishing with figures of 6-82. Monty Panesar took his first and last wickets of the match before and after lunch, leaving two men standing at the crease.
Stuart Broad thought he'd finished the job when Prasanna Jayawardene went for a pull and top edged a catch back to the bowler, but England celebrations were cut short when the umpire Rod Tucker called for a replay, which showed Broad's front foot well over the line. The subsequent appeal for a run out - Broad had removed the bails after the catch with Jayawardene out of his crease - was denied, the ball deemed already dead.
The score at that point was 168-9, a Sri Lankan lead of 293. The batsmen did not waste the lifeline gifted to them, and Jayawardene brought up the 300 lead in the next over, lofting Panesar over mid-off for four followed by a six back over the bowlers head.
They frustrated England with the addition of 47 runs before Anderson ran out Jayawardene, charging back for a risky second, to finish on 214, a daunting 340 fourth innings total to win. It is a feat that England have never previously achieved. The highest winning fourth innings total against Sri Lanka by any team was achieved by India, 264-3.
The England openers saw out the seven overs to tea, but Cook fell soon after the break, deemed out after a Sri Lankan review for a catch behind. Closer inspection of replays showed slight deviation of the ball from Herath as it whizzed past Cook's bat, but whether or not there was conclusive evidence to overturn the on field umpire remains debatable.
It once again raises the contentious issue of the UDRS. If used, it should be universal, with all the available technology. If a host nation cannot afford hotspot, the ICC should provide it.
After another disappointing innings for Andrew Strauss (27), whose role as captain appears to be all that is keeping him in the team, Trott and Pietersen came together to prove that England are capable of competent batting in the sub-continent. A scare for Pietersen on 12 - an inside edge put down by leg slip off Randiv - was the only hiccup before close of play.
England still need another 229 to win. Time is not an issue, but England will need this partnership to continue well into day four.