Sri Lanka bowled Pakistan out for 100 in the first innings in reply to their own 472, with off-spinner Suraj Randiv grabbing 4-13 and left-arm spinner Rangana Herath taking 3-30.
The hosts surprisingly declined to enforce a follow-on despite a substantial lead of 372 runs and made 137-5 in their second knock when skipper Mahela Jayawardene declared in the final hour.
Pakistan, set an improbable victory target of 510 runs, were reduced to 36-3 by stumps after seamer Nuwan Kulasekara dismissed stand-in captain Mohammad Hafeez and Taufeeq Umar.
Herath had Azhar Ali taken at silly-point by Thilan Samaraweera, leaving nightwatchman Saeed Ajmal (11) and the team's most experienced batsman Younis Khan (0) at the crease.
Photos: Urvashi Rautela, Zoya Afroz at an event in Delhi
Photos: Celebs look super sexy in racy gowns at Oscars after-party
Photos: Remembering first President of India - Rajendra Prasad
6 times famous people got into trouble because of number plates
Oscars 2017: Emma Stone, Nicole Kidman, other stars on red carpet