Sri Lanka captain Angelo Mathews took his Test-best figures before the tourists' openers survived until lunch on the third day of the second Test against England at Headingley on Sunday.
Sri Lanka in their second innings were 22 without loss at lunch, a deficit of 86 runs.
Left-hander Dimuth Karunaratne, dropped on four by second slip Chris Jordan off James Anderson, was 16 not out and Kaushal Silva six not out after England failed to make the most of overcast conditions by too often bowling short of a length.
More From This Section
Meanwhile fellow seamer Shaminda Eranga took four for 93.
England, who resumed on their overnight 320 for six, built upon Australia-born opener Sam Robson's maiden Test century, were bowled out for 365 as they lost their final four wickets inside 12 overs Sunday.
Jordan late-cut Sunday's first ball, from Mathews, for four.
The all-rounder, however, had a lucky break on 12 when he edged a good-length Eranga ball between wicketkeeper Dinesh Chandimal and first slip Kumar Sangakkara for four.
But Eranga got his man when Jordan, on 17, edged another testing delivery that saw second slip Mahela Jayawardene, diving in front of first slip Kumar Sangakkara, hold an excellent two-handed catch.
And England were 344 for eight when Mathews had Stuart Broad caught in the gully by Lahiru Thirimanne.
Mathews's superb off-cutter then clean bowled tailender Liam Plunkett.
But Prior, on-driving Mathews for four and Eranga high-over long-on for six, took England into a lead in excess of a hundred.
Eranga, though, wrapped up the innings when last man Anderson gave a gentle return catch after fending at a bouncer, with England 108 runs ahead.