The pair came together at 393 for seven and were not parted until Sri Lanka were past the 500 mark.
Malinga scored 64 off 75 balls with nine fours and two sixes before top edging a pull to fine-leg while Herath, batting with great assurance, struck 10 fours and one six in compiling an unbeaten 80 off 93 balls.
Both recorded their highest test scores while the partnership was an eighth wicket record against India.
Muttiah Muralitharan, the world record holder for test wickets who is making his final test appearance, was greeted by fireworks when he came out to bat and the Indian fielders formed a guard of honour.
Fast bowler Abhimanyu Mithun on his test debut added the wickets of Prasanna Jayawardene for 27 and Malinga in the afternoon session to end with figures of four for 105.
India rallied to capture four Sri Lanka wickets on the third morning of the weather-interrupted test.
Resuming at 256 for two after Monday’s play was completely washed out by rain, Sri Lanka reached 361 for six at lunch losing four batsmen for 105 runs in an extended morning session.
India made their initial breakthrough in the second over of the morning when Ishant Sharma had Tharanga Paranavitana caught behind for 111 after the opener had added a single run to his overnight score.
The introduction of the second new ball after 83 overs inspired Sharma to further success as he picked up the wickets of Mahela Jayawardene (48) and Angelo Mathews (41).
The competition will be a key highlight of the third edition of the 1 Billion Followers Summit, taking place from January 11 to 13, 2025
uae4 hours ago
The event featured insights from key speakers, including Yogacharya Dhakaram, Nilesh Ashar, and Ekansh Agrawal.
kt network4 hours ago
The first two Tests will be held back-to-back in Multan and the last in Rawalpindi
sports4 hours ago
They will remain on display at the museum until at least April 2025
arts4 hours ago
Unveil four prestigious 'Majors' in Men’s and Ladies’ Divisions to secure premier invitations for the elite tournaments
sports5 hours ago
The organisation was honoured during a glittering award ceremony at ASCM Connect 2024: North America in Austin, Texas
kt network5 hours ago
The Numaish Festive Edit 2024 will showcase an impressive array of over 90 exclusive designers
kt network5 hours ago