Joe Root and Jonny Bairstow came to England's rescue after Sri Lanka again tortured the tourists' openers with spin, leaving the second Test well poised in Galle.
Sri Lanka advanced from their overnight 229-4 to 381 all out, with James Anderson snagging 6-40, before Lasith Embuldeniya reduced England to 5-2 in their first innings.
They recovered to reach the close on 98-2, with captain Root (67 not out) and ally Bairstow (24no) showing cool-headed resilience, although the latter survived a precarious lbw call just before the close.
Root, in his 99th Test, went beyond fellow Yorkshire great Geoff Boycott's career haul of 8,114 runs at this level during his unflappable innings, going sixth on England's all-time list.
By contrast to the third-wicket pair, Dom Sibley and Zak Crawley have found left-arm spinner Embuldeniya almost unplayable in this series.
The 24-year-old removed both openers for single-figure scores in each innings of the first Test and on this occasion he prised out Sibley for a duck and Crawley for just five.
Sibley was back on his stumps, floundering, when Embuldeniya breached his defences to get the lbw verdict, and Crawley was prised out by a delicious delivery that caught the edge and angled into the hands of Lahiru Thirimanne at first slip.
It means Sibley has made just six runs in three innings, Crawley faring little better with only 22 so far on this tour.
Fortunately for England, the Yorkshire pair of Root and Bairstow brought their experience to bear and found a way to exert control, pushing and prodding but mostly sweeping and reverse-sweeping their way to stability.
Anderson had earlier caught the eye once again, the 38-year-old producing figures that statistically rank as the fourth best of his Test career.
Already armed with three wickets from day one, Anderson made a swift impact in the morning by having century maker Angelo Mathews caught by wicketkeeper Jos Buttler for 110 in the second over of the day.
Niroshan Dickwella weighed in with 92 before falling to Anderson as he and Dilruwan Perera (67) put Sri Lanka in a sturdy position.
England caught in a spin
While Anderson was going through his majestic repertoire, Jack Leach and Dom Bess toiled for a combined 0-195 from 64 overs.
They were made to look limited by Sri Lanka's batsmen, who handled the England spin pair far more adeptly than during the first Test, when together they snagged 14 wickets.
This time there was no penetration, but Sri Lanka's premier spinner Embuldeniya immediately found zip, accuracy and effective turn, humiliating England's top two batsmen once again.
Crawley made 267 against Pakistan at Southampton last August, and he has one innings left in Galle to show his true quality.
Kevin Pietersen was moved to post to Twitter a letter he once received from Rahul Dravid on how to play spin, urging England management to pass the guidance to the openers.
England's skipper made a double century in the first Test against Sri Lanka, and again he soon got on top of the home side's attack.
He struck seven boundaries in reaching his fifty, never looking in trouble.
Sri Lanka appealed for an lbw when Root offered no shot to a turning ball from Dilruwan Perera, but the ball started out so wide that it was always missing by a long way.
England will want more of the same from Root on Sunday, and should that be forthcoming this could turn into quite some match.
Sri Lanka will want to break up the established partnership as early as possible on day three, with Bairstow looking the more vulnerable batsman.
If Embuldeniya finds his choice line early in the day, he will fancy removing the man who England have surprisingly chosen to rest for their upcoming series with India.
For in-depth, objective and more importantly balanced journalism, Click here to subscribe to Outlook Magazine