Joe Root completed a masterful double century as England built a formidable lead on the third day of England's first Test in Sri Lanka, but the hosts finally found some batting resolve of their own in Galle.
Root converted his overnight 168 into 228 in near flawless fashion, totting up a fourth double ton for his country, and was last man out with the score at 421.
While the touring captain continued accumulating in reliable fashion, sweeping habitually out of the middle of the bat and watching the spin diligently, the game situation advanced rapidly around him as England lost six wickets for 101 in the morning session.
That left them 286 ahead, a huge buffer on a pitch taking lavish spin, but openers Kusal Perera (55no) and Lahiru Thirimanne (34no) withstood the scoreboard pressure to reach tea at 90 without loss.
Between them the pair blunted 35 overs as England's attack laboured unsuccessfully, in stark contrast to rolling the entire team for 135 on the first afternoon. A lead of 196 was still a lofty one, but forcing the result now looked likely to require an element of battle.
Both teams were well rested after rain wiped out the evening session on day two but England's prior momentum remained unchecked. Root drove the third ball of the day for four to get things up and running before his partner, Jos Buttler, treated himself to a trio of reverse sweeps to the boundary ropes.
Root soon picked up his 8,000th Test run, the seventh Englishman to do so and the second quickest having chalked up the feat in his 178th innings – two more than Kevin Pietersen.
Sri Lanka were passive as the batsmen added 42 in the first half-hour and were going nowhere until they were allowed to change the misshapen ball. The replacement brought immediate success, Buttler undone by a touch of seam as he nicked Asitha Fernando behind for 30.
The under-used seamer then made it two in two, castling Sam Curran with a yorker first up after the all-rounder had spent 104 overs watching from the dressing room.
Root was undeterred, launching his first six over wide long-on and then bringing up his fourth double ton in Tests with the first of two successive sweeps for four. After waiting over a year for a century, he had cashed in handsomely here.
A poor call saw Dom Bess run out for nought, sacrificed to preserve his skipper and Dilruwan Perera made short work of Jack Leach and Mark Wood. Root was seemingly set for a big not out, Stuart Broad twice overturning lbw decisions on DRS, but finally gave in when he hammered Perera to one of the handful of boundary riders on the on-side.
Sri Lanka's first innings was a comedy of errors lasting less than 47 overs but Perera and Thirimanne made a point of knuckling down. The first 13 overs saw five bowlers used, with Root's off-spin soon making a sixth option, but nothing came.
Perera and Thirimanne scored 16 and 17 from their first 50 balls respectively, before the former cut loose with a swiped six off Jack Leach followed immediately by a swept four. Moving to his half-century took him just 41 additional balls as the expected chances failed to materialise.
The opener's celebrations turned to grimace within a few seconds, Wood smashing him on his wrist with a bouncer that left him requiring heavy strapping, but England could not par the pair.