The world's most successful bowler, who was eight short of the 800-wicket mark in his final appearance, trapped batting record holder Tendulkar leg-before for eight before stumps on the third day.
The blow left India on an uneasy 140-3 at close after a superb rearguard action by Sri Lanka's tailenders helped the hosts pile up 520-8 declared in their first innings by tea.
Virender Sehwag hit a typically robust 85 not out to keep India afloat following the cheap dismissals of opener Gautam Gambhir, Rahul Dravid and Tendulkar in the final session of play.
Sehwag hit 14 boundaries and a six before play was called off 10.2 overs early due to bad light at the Galle International Stadium.
The sun broke for the first time in two days to allow play to begin after the entire second day had been washed out and 22 overs were lost on the first day due to heavy rain.
India's seamers had grabbed four important wickets, three of them to the lanky Ishant Sharma, as Sri Lanka slipped from Sunday's