England held a slender nine-run lead at tea on day three of the second Investec Test against Sri Lanka after two sessions that brought the tourists well into the game at Headingley.
Sri Lanka's second innings totalled 99 for two at the break, all but wiping out the 108-run advantage England had established in the morning.
That was significantly less than the hosts had counted on when resuming on 320 for six, 63 ahead, but they lost four wickets for 45 as Shaminda Eranga and Angelo Mathews gave no quarter.
Alastair Cook's side then failed to cause their opponents similar problems in an erratic bowling display that relied on Liam Plunkett for the two breakthroughs that did materialise.
England's vision for the morning would have involved some quick scoring from overnight pair Matt Prior and Chris Jordan and a lead in excess of 150.
But with Eranga swinging the ball on an awkward length and Mathews returning a career-best four for 44, they never got off the ground.
Instead they were hustled out with a useful, but hardly intimidating, advantage.
Jordan had already been given one life, a catchable chance passing unclaimed between wicketkeeper and first slip, by the time he fell for 17.
Eranga this time had the safe hands of Mahela Jayawardene to rely on at second slip as he leapt in front of Kumar Sangakkara to pouch the chance.
It was his 196th Test catch, taking him level third on the all-time list with Ricky Ponting.
Stuart Broad and Plunkett followed in short order, Mathews accounting for both.
Plunkett got a cracker, cutting dramatically off the pitch and toppling middle stump.
Prior (27no) was the only man who seemed on firm ground at the crease, guiding the lead towards three figures as wickets tumbled.
With only James Anderson for company, Prior took England past that psychological mark by hoisting Eranga for six over long-on.
There was no further opportunity for fireworks as Eranga bounced Anderson, whose evasive action resulted in a simple return catch.
Conditions were ripe for England to respond in similar fashion, with plenty of assistance on offer amid gathering clouds.
But in 12 overs before lunch they went wicketless.
Anderson and Broad were both guilty of failing to engage the Sri Lankan openers around off stump, but each enticed one authentic nick from Dimuth Karunaratne before the break.
Anderson's flew straight to Jordan at second slip but he fumbled it at chest height, while Broad's squirted wide of the three-man cordon.
That aside, England went either too short or too wide.
That pattern continued until the 21st over when Plunkett removed Kaushal Silva eight balls into his first spell.
There was no mystery when the moment came but it was full, fast and tempting enough to edge behind.
Plunkett had Sangakkara fending uncomfortably immediately, but a set of five wides and two inviting half-volleys soon settled the batsman.
All the while, England's lead was evaporating.
It was down to just 15 when Karunaratne departed for a flaky but valuable 45.
Plunkett, after his second change of ends, dug one in at Karunaratne's body and flicked the glove on its way through.
The opener called for a review but his suggestion that his hand had come off the bat before contact was unfounded.