Sam Robson's maiden Test century put England in credit before their late wobble on day two of the second Investec Test against Sri Lanka at Headingley.

The Australia-born opener's patient 127, out of 320 for six, helped England into a 63-run lead by stumps in this series decider.

It was also, alongside Gary Ballance's 74, a window on England's Test future as the second-wicket pair put on 142 and Robson faced 253 balls in his six-and-a-quarter-hour innings.

After another worrying early dismissal for England captain Alastair Cook, and before three wickets fell for two runs to erode the home advantage, Robson and Ballance's careful accumulation served their adopted country ideally.

Robson's performance, in only his second Test after making one and 19 on his home-ground debut at Lord's, was a personal triumph in front of parents Jim and Rosamunde - on a two-week trip from his native Sydney to watch the start of their son's international career.

Four wickets in the evening session, as the ball began to move around under encroaching cloud cover, levelled the contest - but with a notably fluent half-century from Ian Bell (64), in his 100th Test, England still had some leeway.

There were no frills to the Robson-Ballance alliance in which the former brought an ordered functionality - but no additional flair as yet - to a wider audience and a higher level, having profited prolifically with the same reported method for Middlesex.

Robson's England credentials were already questioned on last week's evidence, but this time he demonstrated that the virtues which have seen him prosper in first-class cricket can work for him in Tests too.

Where he had appeared unbalanced to some in his two short innings at HQ, here he left expertly, drove well through the off-side when the opportunity arose and was routinely efficient off his pads.

There was even for good measure a six, up the wicket over long-on off Rangana Herath and only the sixth of his first-class career, to add to his 15 fours.

Cook had got no further than the fourth over of the morning, and added just three to his overnight 14, before an indeterminate prod forward resulted in an edge low to slip off Dhammika Prasad.

Ballance announced himself with a cut for four off the same bowler to get off the mark, but neither he nor Robson proved to be in any rush.

Instead, they established themselves at a traditional Test match tempo - a relative slow grind but one which fit the bill.

Robson passed his 50 before lunch, from 102 balls, and Ballance had faced 14 more when he reached the landmark in mid-afternoon with another cut for his seventh four - off Nuwan Pradeep.

If memorable highlights were thin on the ground, there were few alarms either from a novice pair sharing just five caps between them.

Ballance was reprieved by DRS on 31, when Herath - and umpire Billy Bowden - thought he was lbw, only for simulation to depict the slow left-armer turning the ball more than the width of the stumps.

Robson might have gone lbw too on 78, to Prasad, had the bowler appealed when his yorker hit the batsman on pad before bat.

In between, on 61 Ballance offered a sharp chance off Herath straight to short-leg - where Kaushal Silva could not hold on.

The partnership therefore remained intact until Sri Lanka captain Angelo Mathews, who finally brought himself on for the 66th over, struck with his ninth delivery.

Ballance was beginning to threaten a second successive century when the medium-pacer had him caught behind pushing forward.

His follow-up innings, and Robson's breakthrough, were evident cause for optimism - especially after Liam Plunkett's maiden five-wicket haul on day one - that England have some handy ingredients in place at the start of their much-heralded new era under Cook and returning coach Peter Moores.

Robson's eventual departure, bowled through the gate driving at Pradeep, did little to diminish any of that.

But Bell edged Shaminda Eranga down the leg-side, the second of four catches for Dinesh Chandimal.

Joe Root guided Mathews behind and then Moeen Ali edged Eranga on the front-foot defence as England hit unexpected trouble in a last hour which could easily have been worse had the tourists held catches offered by Matt Prior on nought and Chris Jordan on one.