Tour match, Fenner's: Sri Lanka 289 & 256-6 dec v British Universities 125 & 130-8
British Universities dug in on the final day to keep Sri Lanka two wickets short of victory in their opening tour match at overcast Fenner's.
Samaraweera retired out after hitting a century
Chasing 421 to win, the students were 62-5 at tea, Chaminda Vaas and Malinga Bandara taking two wickets each.
Opener Damien Shirazi took two hours over his 20 and ninth-wicket pair Paul Harrison and David Balcombe stood firm.
Earlier, Thilan Samaraweera hit 114 before retiring out and wicket-keeper Prasanna Jayawardene made 52 not out.
Shirazi kept out 71 deliveries between lunch and tea - while the tourists' frontline seamers Chaminda Vaas and Nuwan Zoysa conceded only 14 from 12 overs between them.
His partner Richard Clinton fell when Vaas found enough swing to find the edge and allow Jayawardene to complete a neat catch at slip.
Zoysa then got rid of another left-hander, nipping one away off the pitch to knock over Mali Richards' off-stump.
Home captain Luke Parker dealt with the seamers encouragingly only to lose his bearings as he yorked himself, coming down the pitch to Bandara's leg-spin.
Immediately after tea Shirazi's dogged contribution came to a summary conclusion when he was bowled aiming to cut Bandara.
When Vaas' swing fooled Nick Lamb to win an obvious lbw verdict the students had lost three big wickets for seven runs in six overs.
As the light deteriorated, though, Sri Lanka turned to spin at both ends and just failed to complete their task.
Samaraweera had begun the day by moving confidently from his overnight 82 to three figures.
He reached his hundred when he picked a slower delivery from David Balcombe to strike his 12th boundary past mid-off from the 160th ball he faced, and eventually retired out.
His fifth-wicket partner Chamara Kapugedera was earlier undone by Balcombe's change of pace, hitting a simple catch to extra-cover to end a stand of 131.