Shaminda Eranga and Rangana Herath tore through the England top-order to leave the hosts wobbling at 117 for five at tea on the fourth day of the first Test, raising hopes of a result in match that appeared destined for a dour draw.
Sri Lanka captain Angelo Mathews, who along with Kumar Sangakkara (147) helped Sri Lanka pass the follow-on target, brought up a well-deserved third Test ton when he smashed a James Anderson full toss through extra cover.
He was unable to push on after falling lbw to Liam Plunkett for 102 from the next ball he faced.
England debutant Chris Jordan wrapped up the innings when Nuwan Pradeep (4) was struck on the shoulder by a bouncer and subsequently hit the wickets with his bat as he fell to the ground, his side having added 38 runs to their overnight total.
Cook and Robson eased through to lunch but did not last much longer, with the captain feathering an edge on 28 through to Prasanna Jayawardene off Eranga, who had opened his spell with three consecutive maidens. Eranga doubled his wicket tally in his next over, getting through Robson's defences.
Danger man Eranga
Bell, playing his 99th Test, went the same way as the hosts teetered at 69 for three, Eranga having taken three
wickets for three runs off 21 balls.
Ballance and Root appeared to have knuckled down before left-arm spinner Herath caught the latter on the back leg dead
Moeen hit the first ball he faced back down the pitch for four but Herath found a gap through bat and pad to shatter the stumps with his next delivery to compound England's woes.
As in the first innings Prior survived a confident lbw appeal early in his innings, while Ballance struggled to find the gaps, at one stage going 26 balls without troubling the scorers in the lead up to tea.