It was the best by any bowler in a debut three-Test series, surpassing Englishman Alec Bedser's 24-wicket haul against India at home in 1946.
Sri Lanka kept up non-stop pressure on the clueless Indian batsmen, with Mendis showcasing his variations from one end and wily veteran off-spinner Muttiah Muralitharan (21 wickets) providing valuable support from the other.
In the event India choked despite having quality middle-order batsmen in Sachin Tendulkar, Rahul Dravid, Sourav Ganguly and Venkatsai Laxman, who could manage just three half-centuries between them.
"Mendis was the main difference in the series. It was not easy to pick runs when Mendis and Murali are bowling together. The pressure they created made it tough for us," said Indian skipper Anil Kumble.
Mendis was in the news even before he had bowled his first ball in Test cricket, having done remarkably well in eight one-day internationals since making his debut in the West Indies early this year.
He destroyed India in the first match he played against them, grabbing six wickets for just 13 runs in a magical spell to fire his team to an emphatic victory in the Asia Cup final in Karachi last month.
Mendis is not a big turner of the ball like retired Australian leg-spinner Shane Warne or Muralitharan, but the key to his success is the way he grips the ball with his fingers and flicks it to bowl a variety of deliveries.
"It's important to have someone like Mendis. He creates opportunities, adds pressure and picks up wickets," said Sri Lanka captain Mahela Jayawardene.
"He has surprised a lot of us. It's an advantage to have a guy like him to back Murali and (Chaminda) Vaas. That's where we had lacked somebody, that strike option apart from those two guys."
Mendis was instrumental in ruining the Indian batsmen's reputation for playing spin better than pace as he overshadowed even Muralitharan, the world's leading wicket-taker with 756 Test scalps.
Tendulkar, who was 172 short of breaking retired West Indies captain Brian Lara's world record of 11,953 Test runs before the series, could manage just 95 in six innings without a half-century.
Laxman impressed only in patches as he scored 215 runs, while Dravid made 148 and Ganguly 96.
"For a new batsman to go in straight away and face two spinners is never easy. We are not offering excuses as overall we did not play quality cricket," said Kumble.
"It is not about a couple of batsmen alone. It is important for everyone to contribute. The middle and lower order did not contribute and that let us down in the series."
Indian openers Virender Sehwag and Gautam Gambhir alone salvaged their reputations, playing key roles in their team's victory in the second Test in Galle.
Sehwag smashed an unbeaten 201 and 50, while Gambhir made successive half-centuries to give solid starts. But it was the only occasion when the Sri Lankan spin duo looked under pressure.