Sangakkara stands tall as England dismiss Jayawardene
Sri Lanka's Kumar Sangakkara (R) hits a shot past England wicketkeeper Matt Prior on the fifth day of the first Test at Lord's cricket ground in London on June 16, 2014 - by Ian Kington
But fellow batting great Kumar Sangakkara (59 not out) remained resolute following his first-innings 147.
With one session left in the match, Sri Lanka were 164 for three in their second innings -- needing a further 226 runs to reach their imposing victory target of 390 in a minimum of 34 overs.
It seemed the match was meandering towards a draw when Jayawardene, who in common with Sangakkara was likely playing his last Test at Lord's, was caught behind hanging his bat out to James Anderson for 18.
New batsman Lahiru Thirimanne did not look at ease on his way to nought not out at tea.
But given just three wickets had fallen in the day's play thus far, it was still going to take a huge effort from England's attack to force a win that would put them 1-0 up in this two-match series ahead of Friday's second Test at Headingley.
Sangakkara, bidding to become only the second overseas player after the West Indies' George Headley in 1939 to make hundreds in both innings of a Lord's Test, appeared to hold the key to the outcome.
Indeed, should the left-hander reach three figures on Monday, he would become only the fifth player to make hundreds in four successive Test innings following his scores of 319 and 195 against Bangladesh in Chittagong in February.
Cook, predictably, declared on his side's overnight second innings score of 267 for eight.
That left Gary Ballance on 104 not out -- the Zimbabwe-born left-hander's maiden Test century in only his second match at this level.
The 24-year-old's innings had helped England recover from the struggling position of 121 for six on Sunday.
Cook's declaration left Sri Lanka needing to break the Lord's record for a winning fourth-innings total in a Test of 344 for one, requiring 342, set by the West Indies against England in 1984, for victory.
Although this was a fifth-day pitch, it remained a fundamentally good surface to bat on and, with little in the way of swing, England had their work cut out.
But they unsettled Sri Lanka's openers with well-directed short-pitched deliveries and it was from such a rising Stuart Broad ball that Dimuth Karunaratne (16) turned a catch straight to Sam Robson at short-leg to leave the tourists 25 for one.
However, debutant off-spinner Moeen Ali, brought in to replace the retired Graeme Swann but primarily a batsman, posed little threat.
Pace rather than spin threatened to be Sri Lana's undoing and so it proved for opener Kaushal Silva.
Having completed a 93-ball fifty after lunch, Silva fell for 57 when he gloved debutant Chris Jordan down the legside and recalled wicketkeeper Matt Prior took a fine diving catch, although it needed a challenge to New Zealand umpire Billy Bowden's original not out verdict to confirm the dismissal.