The former Sri Lanka captain batted through the third day to finish unbeaten on 204 from 339 deliveries, inclusive of 17 boundaries and a six.
The visitors finished the day on a mammoth 591 for five from 160 overs, their highest total on Indian soil, surpassing their previous best, 420, made in December 1986.
With a lead of 165 runs -- India put up 426 in the first innings -- they are well on course towards winning their first Test on Indian soil.
Jayawardene got good support from namesake Prasanna Jayawardene [ Images ], who finished the day on 84 not out from 186 deliveries. The two batsmen added 216 runs for the fifth wicket.
There was no stopping Jayawardene, who dominated the proceedings as he registered his sixth double century in Tests and second against India. He added 138 runs for the fourth wicket with Thilan Samaraweera [ Images ], who scored 70 before he was brilliantly caught by Yuvraj Singh [ Images ] at square leg trying to pull a short delivery from Ishant Sharma [ Images ].
Tillakaratne Dilshan [ Images ] had smashed 112 on the second day to give Sri Lanka a solid start after India amassed 426, courtesy Rahul Dravid's [ Images ] 177 and Mahendra Singh Dhoni's [ Images ] 110.
Morning session: (26.2 overs, 100 runs, 2 wickets)
Resuming on 275 for three in 70 overs, Sri Lanka's batsmen found the going quite easy despite both Amit Mishra [ Images ] and Harbhajan Singh getting a fair amount of help from the wicket.
India started off the third day with the spinners, hoping to unleash the pacers when the new ball was available after 80 overs.
Jayawardene scored the first boundary of the day when he guided Harbhajan through the vacant third man region. Three deliveries later Samaraweera completed his half-century off 87 deliveries, his first in India, when he cracked a short delivery from Harbhajan through the covers for a boundary in the 73rd over.
Jayawardene brought up the 100-run partnership for the fourth wicket with Samaraweera in 174 deliveries, with a double on the leg side off Harbhajan in the 75th over. In the same over, the former Sri Lanka captain cut a wide delivery from Harbhajan through the third man region for his fourth boundary to bring up his half-century off 86 deliveries.
Samaraweera, on 55, survived a close leg before appeal against Mishra in the 80th over. The leg-spinner deceived him with a quick, flat googly that hit him in line and would have hit the stumps, but the umpire ruled in favour of the batsman.
Predictably, India took the new ball in the 81st over and immediately brought on their pacers.
Zaheer Khan [ Images ] bowled a full toss first up which was despatched through midwicket by Samaraweera in the 82nd over while Ishant continued to struggle with his line.
Against the run of play, Sri Lanka lost the wicket of Samaraweera for 70. He became the third batsman in the Sri Lankan innings to be dismissed off a short delivery when his pull against Ishant was brilliantly taken by Yuvraj Singh, at short square leg, leaping high with arms fully outstretched. (332-4, 86.4)
Samaraweera's disappointment was obvious, as he seemed in absolute control out in the middle. He hit nine boundaries in his 145-ball knock, adding 138 runs for the fourth wicket with Jayawardene.
Jayawardene though continued to make the Indian bowlers struggle, slamming three boundaries in Zaheer's 20th over. Twice the left-arm seamer drifted on the pads and was hit for boundaries through the leg side, and was hit through the covers when he pitched wide while bowling from round the wicket, as Sri Lanka progressed to 382 for four after 90 overs.
The first session did not provide much joy for the bowlers unlike the first two days when four wickets fell each day. In the first ten overs with the new ball Sri Lanka had lost just one wicket as India tactics of starting with the spinners seemed to have worked against them.
Interestingly, India preferred to use part-timer Yuvraj Singh to replace Zaheer with the semi new ball instead of one of the regular spinners. After two listless overs from Yuvraj, it was time to bring on spin from both ends as Harbhajan and Mishra took over the proceedings.
Angelo Mathews batted with caution at the start before stepping out against Mishra in his very first over and lofted him over mid-on for a six. The leggie then dropped short and yet again Mathew punished him as he hit him through midwicket for a boundary.
However, Mathews fell in the next over to Harbhajan, caught at forward short leg, as he tried to hit on the leg side for 17. The wicket fell just at the stroke of lunch, with Sri Lanka going into the break at 375 for five in 96.2 overs.
Despite the loss of those wickets Sri Lanka got the better of the session, having scored 100 runs. They were now just 51 runs behind India's first innings total of 426. Their hopes of taking the lead now rested with Jayawardene, who was looking solid on a classy 86 from 138 deliveries, having hit eight boundaries and a six.
Once again the Indian spinners disappointed, with Harbhajan just about managing to claim a wicket right at the end. But Mishra was all over the place and went for plenty, giving away 107 runs in 24 overs. Ishant claimed the vital wicket of Samaraweera for figures of two for 83 in 21 overs, while Zaheer claimed two for 64 in 20 overs.
Post-lunch session: (27.4 overs, 108 runs, 0 wicket)
India resorted to defensive tactics against Jayawardene -- a packed leg side field and Harbhajan bowling round the wicket, looking to attack new man Prasanna Jayawardene.
Mishra's struggle continued when he pitched full and wide and Mahela Jayawardene had no problems in getting a boundary through the covers to move into the 90s. He cut a wide delivery from Mishra in the next over through point to move to 99, and two deliveries later got the hundred, his fifth against India, with a single on the off-side off just 151 deliveries as Sri Lanka reached 397 for five after 100 overs.
Jayawardene has now scored a century in all Test-playing countries except South Africa [ Images ], where his highest score is 98, in December 2000.
At the other end, Prasanna Jayawardene got busy, rotating the strike from the moment he arrived at the crease, getting to 16 from 23 deliveries in no time.
With Mishra struggling to make any sort of impression, captain Mahendra Singh Dhoni was forced to introduce Zaheer from his end. Prasanna Jayawardene got his first boundary when he flicked Zaheer fine on the leg side as the bowler drifted on the pads in the 106th over.
The two batsmen also brought up their 50-run partnership in the 108th over and Prasanna Jayawardene was getting better with every over in the middle. The Sri Lankan wicketkeeper calmly despatched a full delivery from Harbhajan through the covers for his second boundary as they looked to lift the scoring rate.
Zaheer continued to trouble the batsmen with his fast short deliveries as he hit Jayawardene on the hand with a sharp well-directed bouncer. Interestingly, the majority of Jayawardene's runs had come against Harbhajan, whom he had so far hit for 54 in 58 deliveries, including four boundaries and 22 singles, most of them on the leg side.
Yuvraj replaced Harbhajan but he even failed to make an impression and was pulled through midwicket for a boundary by Jayawardene as he dropped short in the 111th over.
The match was slowly and steadily going Sri Lanka's way as they scored 68 runs in 14.4 overs in the first hour after the lunch break.
After 120 overs, Sri Lanka were comfortably placed at 470 for five in 120 overs, stretching their first innings lead to 44 runs. India were bowled out for 426.
The two Jayawardenes were difficult to stop as they scored at a good rate to build Sri Lanka's lead with no Indian bowling making an effect. They brought up the 100-run partnership for the fifth wicket in just 150 balls at a scoring rate of four runs per over to stretch their team's lead.
With nothing working at all, Dhoni decided to stop the runs by getting Mishra to bowl round the wicket on the rough outside the leg stump but it hardly bothered the Lankans.
While the Indian fielders were content joking around and mingling with each other, the Sri Lankan batsmen never faltered even for a second. They scored 483 for five in 124 overs at the tea break, with Mahela Jayawardene on 142 from 225 deliveries and Prasanna Jayawardene 43 from 82 deliveries.
With a lead of 57 runs already in their bag, they will be hoping to increase the scoring rate after the tea break and end the day with a lead in excess of 200.
Post-tea session: (36 overs, 108 runs, 0 wicket)
India resorted to a defensive field after lunch as even Harbhajan bowled without a slip while Mishra continued pitching on the rough outside the leg stump.
It was as if India had conceded hopes of winning the match and their only chance lay in restricting Sri Lanka's scoring so they would have to bat fewer overs to save the game.
Finally, Yuvraj produced a delivery that got past Jayawardene's bat and took the edge, but with no fielder in the slips it went for a boundary. Jayawardene then repeated the shot two deliveries later for another boundary to bring up his 150 and take Sri Lanka past the 500-run mark in the 129th over.
Despite India resorting to a defensive field, Sri Lanka were successful in finding the boundaries as also singles with ease. Jayawardene cut a short delivery from Yuvraj through the point region for his 15th boundary as the Indian fielders watched helplessly.
With nothing working for him, Dhoni decided to introduce Sachin Tendulkar [ Images ] into the attack. But it hardly mattered to the Sri Lankans who was bowling at them as they coolly collected six runs from Tendulkar's first over.
It was nearly 40 overs since the last wicket fell and the Indians showed they were not interested in another one as they persisted with negative tactics. Prasanna Jayawardene brought up the 150-run partnership, from 245 deliveries, with Mahela courtesy off a single against Tendulkar in the 137th over.
Sri Lanka's lead crossed 100 but they were still not keen on taking the attack to the bowlers, instead preferring to play out the negative stuff.
Prasanna broke the shackles somewhat when he pulled a short delivery from Mishra through square leg for a boundary, the first in nearly ten overs. A few overs later, Tendulkar also pitched one short and Prasanna gave it the same treatment for a boundary through midwicket.
Finally, after a few meaningless overs, Mishra decided to switch to over the wicket to Prasanna, but continued round the wicket to Mahela. After a long break, Harbhajan was introduced into the attack and he also bowled round the wicket to a packed leg side field.
Jayawardene successfully employed the late cut against Harbhajan that flew past wicketkeeper Dhoni for a boundary through the third man region in the 147th over.
The spinners, after a lot of meaningless overs, got a break when pace was introduced from both ends, with Sri Lanka comfortably placed on 564 for five in 151 overs.
Prasanna just about managed to squeeze out a swinging yorker from Ishant and the resultant single brought up the 200-run stand for the fifth wicket in the 155th over.
Jayawardene completed his double century with a quick single to mid-off; he took 330 deliveries to reach the landmark and hit 17 boundaries and a six. This was his sixth double century in Test cricket and second against India.
In sum, the day belonged to Sri Lanka as they plundered 316 runs in the 90 overs while losing just two wickets.
Jayawardene showed remarkable patience to finish unbeaten on a splendid 204, that saw him hit 17 boundaries and a six in 339 deliveries. He got good support from Prasanna Jayawardene, who hit 84 from 186, as the two batsmen were involved in an unbroken stand of 216 runs to take the game away from India.
With a lead of 165 runs and two days still to go, Sri Lanka will fancy their chances of breaking their duck in India.
India can only hope that their batsmen come good and save the match.
The bowling figures once again told a sorry tale. While pacers Zaheer and Ishant did a decent job for figures of two for 93 and two for 108, the spinners continued to struggle despite getting a fair amount of help from the wicket.
Harbhajan took one for 151 from 39 overs while Mishra gave away 152 runs in 43 overs despite bowling with a defensive field for the entire third day.