When Sri Lanka's No 6 walked out yesterday it was generally assumed that the game was up.
Click HERE to upload graphic: Sophia Gardens Scoreboard (292.63kb)
He had a famous name but no pedigree at this pivotal spot in the middle order, previously occupied by some of the game's luminaries. Two wickets had fallen quickly, a new ball was due, the England foot was about to be applied to the Sri Lankan throat.
Three and a half hours later, the unheralded Prasanna Jayawardene was walking in the footsteps of giants. He scored a composed, virtually seamless hundred to ensure that the tourists had enough runs to push England hard in this first Test match of the summer, maybe to push them over the edge.
Jayawardene is no duffer but his batting career as Sri Lanka's wicket-keeper has largely been conducted at No 7, a different animal demanding a different outlook. He had scored two hundreds there, one against Bangladesh, one against India on an Ahmedabad flat 'un.
This was of a different order and it tested England's depleted bowling resources to the limit. The home side never quite reached the stage where they wondered where their next wicket was coming from, although the rejection of their two permitted reviews in successive overs made it a near thing.
A total of 400, managed only once by Australia in the winter, was probably not what England had in mind considering that the stars of the tourists' order, Kumar Sangakkara and the other Jayawardene (Mahela, no relation), contributed 15 between them. Only once, too, did any of Australia's 10 innings occupy more balls than the 722 Sri Lanka faced.
England, having eventually seen off the opposition, were left with 20 overs to bat. Their openers spent most of them as if they were preparing for the morrow until the captain, Andrew Strauss, was out in the last over as the home side closed 353 adrift. It was a return to the colours for Alastair Cook after his epic Ashes series and he looked determinedly well-appointed.
Jimmy Anderson, the bowling hero of the Ashes, spent most of the afternoon and evening off the field with a stiff back and went for the obligatory scan, the result of which will be known today. Scans notwithstanding, it seemed strange that Anderson should come out as nightwatchman to face five balls after Strauss's dismissal.
Anderson's absence had stretched a four-man attack dangerously thin, especially as Stuart Broad and Graeme Swann were out of sorts. Broad struggled again for sustained accuracy, but eventually garnered his 100th Test wicket. Swann seemed to lack his usual drift, but as an off-spinner operating in the first innings of a Test match a return of three wickets meant he could claim eminent respectability, which he presumably will on one of the social networking sites.
Sri Lanka took an audacious step in promoting Jayawardene to allow them to play five bowlers. If nothing else, it showed they had not come to defend. It was 159 for 4 at Jayawardene's entry into the arena and he proceeded to share partnerships of 84, 35, 68 and 51. Sri Lanka made the home side work hard for everything and England could claim that little went their way. When the ball was swinging in the morning, edges either did not go to hand or did not go near enough to be ensnared.
But the precious wicket of the elder Jayawardene, well caught at slip off a splendid ball from Anderson before the overnight score had been improved, was precisely the start England needed. Shortly afterwards, the obdurate Tharanga Paranavitana, who seemed a safe bet for a century, drove at a fuller- length swinging ball from Chris Tremlett and was bowled off an inside edge.
Here was where the innings reached its crossroads. A quick wicket for England and they would follow a route to victory which has become familiar to them. It was crucial for Sri Lanka to head them off and change direction. Between them, Thilan Samaraweera and Jayawardene plotted their course.
Samaraweera flirted perilously with the cordon round the bat, offering a distinctly sharp chance to Cook's left at third slip (prompting immediate recollections of Paul Collingwood's glories) and prodding close to Jonathan Trott at point.
But this was interspersed with some genial strokeplay and England were hapless after lunch when Trott bowled the final overs with the old ball and the tourists went after him. Anderson struck immediately with the new ball, finding enough bounce and away movement to find Samaraweera's edge and then almost as quickly left himself.
Farveez Maharoof survived several close calls including two appeals for lbw which were reviewed, one from Broad, one from Anderson, at which point the bowler's back must have been stiffer than his resolve. They were both close, but neither was close enough and umpires Aleem Dar and Billy Doctrove were not only vindicated but demonstrated again that the ICC elite umpires' list is not misnamed.
Only when Trott bowled again did Maharoof's luck turn. Nothing to do with Trott's bowling, but he did manage to touch a return drive from Jayawardene which went on to the stumps with Maharoof backing up and stranded.
Still England were made to wait as both Thisara Perera and Rangana Herath wielded a merry blade. Perera survived a run-out chance when Kevin Pietersen's underarm throw from cover missed and then drove low in to third slip's left hand. Herath seemed to have been caught at first slip, though replays determined otherwise.
Jayawardene batted his way on at the other end with impeccable calmness. He played correctly, as most of these tourists do, and was utterly unflustered on his way to three figures. He reached 100 with a neat flick for three to square leg, raised his helmet and beat his chest. It still means to something to score a hundred against England away from home, even if that is in Wales.
The last three wickets went for three runs, Jayawardene among them, driving wearily at Broad, but by then Sri Lanka had shown that they will be a considerable irritant this summer.