Fast-bowler Ishant Sharma's seventh five-wicket haul helped India bundle out Sri Lanka for 201 but the hosts fought back to take three quick wickets and leave the third and final Test evenly poised.
India were at 21 for three in their second innings when rain brought an early close to the third day's play with the tourists having an overall lead of 132 runs. Captain Virat Kohli (one) and Rohit Sharma (14) were at the crease.
First-innings centurion Cheteshwar Pujara was bowled for a duck by the second ball of the innings from Dhammika Prasad and Lokesh Rahul was again out shouldering arms, this time to Nuwan Pradeep.
Pradeep also dismissed Ajinkya Rahane to leave India tottering at seven for three.
Earlier, bowling an impeccable line and length after India made 312 in their first innings, Ishant put his team in the driving seat for a series-clinching win with the sides level at 1-1.
The tall right-arm paceman extracted enough movement off the pitch with the new ball to run through Sri Lanka's top order and he picked up two more wickets to give India a lead of 111 runs.
India added 20 runs in the morning to their overnight score of 292-8 to complete a solid first innings and Pujara carried his bat to finish unbeaten on 145.
Left-arm spinner Herath bowled out tail-enders Ishant and Yadav to finish with three wickets and Prasad completed figures of 4-100.