Virender Sehwag slammed a quickfire century and then dismissed both the Sri Lankan openers as India ended day three in the third and final Test on a high, at the P Sara Oval, in Colombo, on Thursday.
At stumps, Sri Lanka were struggling at 45 for two from 16 overs in their second innings, a lead of 34 runs.
Captain Kumar Sangakkara was unbeaten on 12, with night-watchman Suraj Randiv yet to open his account.
Tharanga Paranavitana (16) and Tillakaratne Dilshan (13) fell in successive overs to Sehwag. The part-time off-spinner struck in his first over, having Paranavitana caught behind for 16, and Dilshan caught at short leg for 13.
Earlier, Sehwag's quickfire century and some resolute batting by the tailenders helped India post 436 in their first innings and take a slender 11-run lead.
Sehwag slammed 109 from 105 balls, inclusive of 19 boundaries, before he was caught at cover off Suraj Randiv, who took four for 80.
For India, Suresh Raina (62) and VVS Laxman also scored vital half-centuries (56), putting on 105 runs for the fifth wicket.
Abhimanyu Mithun and Amit Mishra made sure India took the lead, scoring 46 and 40 respectively.
India went into Day 3 sitting pretty on 180 for two in 35 overs.
Thilan Samaraweera's unbeaten century enabled Sri Lanka post a competitive 425 in 138 overs in their first innings. He was left stranded on a splendid 137, inclusive of 12 boundaries and a six, off 288 balls, after a 370-minute stay at the crease.
Pacer Ishant Sharma claimed two wickets in an over to end the innings and finish with three for 72 in 23 overs, while Pragyan Ojha emerged India's best bowler, claiming impressive figures of four for 115 in 46 overs.
Sri Lanka lead the series 1-0 after winning the first Test by 10 wickets, while the second ended in a high-scoring, dull draw.
Lasith Malinga produced a gem straightaway; he beat Tendulkar with the first delivery of the day and then rattled him with a few quick bouncers thereafter. The ploy worked, as a couple of deliveries later, a shaky Tendulkar lashed at a wide outgoing delivery only to edge it behind to wicketkeeper Jayawardene and was dismissed for 41, inclusive of five boundaries, from 72 deliveries.
Tendulkar and Sehwag had added 91 runs in 18.2 overs for the third wicket to lift India after the early dismissal of Dravid on day two.
In the next over, Sehwag completed his century when he pulled Randiv through midwicket for a boundary. The dashing opener brought up the milestone from just 90 balls, hitting 18 boundaries all around the P Sara Oval.
Randiv troubled Sehwag, who looked unsure while defending against the off-spinner and survived a close leg before shout.
But Randiv had his man soon after when Sehwag holed out to cover attempting the inside-out lofted shot. Sehwag was visibly disappointed at having thrown his wicket away and given Sri Lanka the upperhand after an entertaining innings of 109 from 105 balls, inclusive of 19 boundaries.
It was all defence as far VVS Laxman and Suresh Raina were concerned at the start of their innings, with the spinners operating from both ends. Laxman got going with a couple of boundaries when Randiv dropped short on a couple of occasions, to take India to 210 for four after 45 overs.
Raina took time to find his bearings; he took 40 balls to hit his first boundary, pulling a short delivery from Mendis through square leg, and a couple of deliveries later played the sweep for the second four of the over.
The left-hander survived a few close shouts in the next over when Randiv struck him on the pads twice followed by huge appeals from the bowler and close fielders.
But Raina continued his good form from the previous Test, where he had scored a century on debut. Once he got to grips with the conditions he started to open out with regular boundaries. He drove a full delivery from Mendis through the covers for his third four and then hit a four each in the next two overs to reach 27 and quickly overtake Laxman (22) as India put up 250 for four in 56 overs.
Laxman also looked in good touch and milked the bowling with ease. He twice hit the seamers for boundaries through the covers to end the session on a high for India.
At lunch on the third day, India had recovered after a bad start in the session to reach 282 for four in 64 overs, still trailing Sri Lanka by 143 runs.
Laxman looked completely at ease as he scored 42 from 72 balls, while Raina once again impressed with his temperament to scored 39 from 79 balls. The two batsmen played fluently during their 83-run partnership, scoring at nearly 3.5 runs per over to keep India in contention.
Laxman started off the session with a boundary each in back-to-back overs to bring up his half-century from 79 balls.
The duo also brought up the 100-run partnership, the first of the match, for the fifth wicket and take India past the 300-run mark in the 68th over.
With the spinners not making an impression, Malinga tried to unsettle Raina by bowling a few bouncers directed at his body but the youngster coped well.
Mendis continued bowling round the stumps to Laxman, hoping he would make a mistake playing across the line. And the move paid off as Laxman edged one to first slip trying to play it fine on the off-side after a good innings of 56, laced with seven boundaries in 97 balls.
In the next over, Raina brought up his fifty from 96 balls when he guided Malinga wide of the first slip fielder for a boundary. He got another four in that over when he hit another wide delivery over the point region for his ninth boundary, in the 72nd over.
Mendis then dealt India another big blow when he claimed the wicket of Raina for 64. The youngster, who hit a century in his previous innings, once again made a vital contribution. He hit 10 boundaries in his 111-ball knock before he chipped one straight to the short midwicket fielder.
Captain Mahendra Singh Dhoni nudged around for 17 balls before he stepped down the wicket and hit Randiv through the leg side for his first four, in the 78th over.
Malinga came back for a new spell and struck with the wicket of Dhoni, who was also hit on the fingers by a quick bouncer. The Indian captain, who made 15 from 30 balls, tried to pull the next delivery, which was also short, but gloved it and was caught down the leg side.
Abhimanyu Mithun once again proved his utility with the bat as he made 18 to take India to 360 for seven in 85 overs before Sri Lanka took the second new ball.
The move nearly worked as Amit Mishra (4) edged a wide delivery from Malinga, but Mathews, at third slip, dropped the easy offering, in the 86th over.
Welegedara's nightmare Test continued as Mithun lifted him straight down the ground for a boundary, his third of the innings.
The Test match was still tantalizingly poised as India reached 378 for seven in 90 overs at tea on day three, still trailing Sri Lanka's first innings score of 425 by 47 runs.
Mithun was unbeaten on 26 from 45 balls, while Mishra was not out on 12, as India closed in on the 400-run mark.
Sri Lanka started with pacers after tea and the Indian tail continued to defend before the spinners were introduced. Mishra immediately went after Mendis and lifted his first delivery over midwicket for a boundary.
At the other end, Malinga continued to pepper Mishra and Mithun with bouncers and even struck them a couple of times on their fingers.
Mishra flicked a slow full toss from Malinga through square leg for another boundary and took India past the 400-run mark, in the 96th over.
Mithun continued to impress with the bat; he cut a short wide delivery from Malinga over the off-side for his fifth boundary and moved into the 40s.
Randiv came back for a new spell and made the much-needed breakthrough for Sri Lanka when he had Mithun caught at leg slip after a good knock of 46 from 77 balls, laced with five fours.
Mithun and Mishra added 64 vital runs for the eighth wicket to help India inch closer to Sri Lanka's first innings total of 425.
Mishra took India past that score and got that vital lead when he swept Randiv through square leg for a boundary. But the bowler extracted revenge in his next over when Mishra charged down the wicket and holed out to Dilshan at deep midwicket after a fine knock of 40 from 66 balls.
Ishant Sharma was the final wicket to fall; he was adjudged caught at short leg off Randiv for eight. However, closer looks at the replays showed that the ball missed the bat by a long way. Ishant walked back shaking his head in disbelief.
India were dismissed for 436 in 106.1 overs, taking a narrow lead of 11 runs.
Randiv emerged the most successful bowler, claiming four for 80 in 25.1 overs, while Malinga took three for 119 and Mendis two for 109.
India must be thankful to their tailenders for taking them past the Sri Lankan total; the last three wickets added 86 runs between them.
(Sri Lanka 2nd innings)
Tharanga Paranavitana started off with a bang, hitting the first ball of the innings, from Mithun, for a boundary through square leg. Tillakaratne Dilshan got his first boundary in the fifth over when he pulled a short delivery from Mithun through the leg side.
It was not long before spinner Pragyan Ojha was introduced -- with Sri Lanka on 19 for no loss in six overs -- and he got a few deliveries to turn square off the footmarks.
But, in a master stroke, Dhoni brought on part-timer Virender Sehwag from the other end and the move paid off. Both the openers fell to the off-spinner.
First, Sehwag had Paranavitana (16) caught behind by wicketkeeper Mahendra Singh Dhoni in his very first over. In his next, he had Dilshan (13) brilliantly caught by Murali Vijay at short leg. Sri Lanka were reduced to 39 for two after 12 overs.
Sangakkara safely negotiated the remaining few overs to remanin unbeaten on 12 at close. It took his Test tally to 8000 runs, the fastest in terms of innings. The Sri Lankan got to the mark in 152 innings, beating the record of Sachin Tendulkar, attained the milestone in 154 innings, in May 2002.
At stumps, Sri Lanka were 45 for two in 16 overs, a slender lead of 34 runs.
The first session on day four will be crucial for both teams. India will be hoping to claim a few early wickets to take control of the match, while Sri Lanka need to get a decent score in their second innings on a pitch getting difficult to bat with every passing over.