At tea, England were 173 for seven, still needing a further 177 runs to reach their victory target of 350.
But the more realistic goal was to preserve their last three wickets in the minimum 40 overs that remained to secure a draw, with the new ball available to Sri Lanka three overs after tea.
Root, six not out overnight, got under the skin of his opponents with his verbal taunts in the field.
And, with Sri Lanka offering a few choice words of their own to the batsman, umpires Billy Bowden and Steve Davis intervened several times in a bid to calm frayed tempers.
Together with Moeen Ali (56 not out), Root kept Sri Lanka at bay for more than two hours until Nuwan Pradeep made the breakthrough.
Root, looking to turn a full-length delivery legside, got an outside edge off Pradeep and was caught in the gully by Lahiru Thirimanne for 31. But left-hander Ali pressed on to a maiden Test fifty off 129 balls, including eight fours, in nearly three hours.
Sri Lanka thought they had him caught on 52 at leg slip off left-arm spinner Rangana Herath but Davis ruled not out and a review confirmed the Australian’s decision.Nevertheless England, who resumed at 57 for five after Dhammika Prasad’s four-wicket burst late on Monday, saw the paceman strike again before tea.
Prior, who in Auckland last year took England to an unlikely draw by repelling New Zealand for 54 overs, had made 10 when he was undone by a lifting delivery from Prasad that took the handle of the bat and was well caught at short leg by Kaushal Silva.
However, Bowden asked third umpire Paul Reiffel to check for a no-ball.
It was a desperately close call but the former Australia seamer ruled in Sri Lanka’s favour and England were 160 for seven with the 31-year-old Prasad able to celebrate taking five wickets in a Test innings for the first time.
It was all a far cry when England were 311 for three after tea on the second day of this Test, thanks to Australia-born opener Sam Robson’s maiden Test century, and then again when they reduced Sri Lanka to 277 for seven on Monday — a lead of just 169.But Sri Lanka captain Angelo Mathews went on to make a superb Test-best 160, the all-rounder putting on 149 with Herath (48) for the eighth wicket.
SRI?LANKA?(I Innings): 257 all out
ENGLAND?(I Innings): 365 all out
SRI?LANKA?(II Innings): 426/8 decl
ENGLAND?(II Innings, O/n: 57/5)
Root c Thirimanne b Pradeep 31 MM Ali (batting) 56Prior c Silva b Prasad 10Jordan (batting) 9Extras (B-3, LB-7, W-2, NB-7) 19 Total (for 7 wickets, 77 overs) 173Fall of wickets: 6-124, 7-160.Bowling: Pradeep 8-2-33-1, Eranga 15-5-27-0, Herath 29-10-48-1, Mathews 9-2-16-0, Prasad 16-2-39-5.