Sri Lanka beat India by 16 runs to leave T20 series squared
Chasing 207 runs to win at the Maharashtra Cricket Association Stadium in Pune, India's openers Ishan Kishan (2) and Shubman Gill (5) departed early at the hands of Kasun Rajitha.
Dilshan Madushanka then dismissed Rahul Tripathi for five to leave India reeling.
Suryakumar Yadav and Axar Patel gave home fans a glimmer of hope by putting together a blistering partnership of 91 runs, but ultimately it was too little too late for India, who ran out of gas after Madushanka struck once again to remove Suryakumar.
Earlier, Mendis got Sri Lanka off to an excellent start with his knock of 52 as he combined with Pathum Nissanka in an 80-run opening stand.
Fast bowler Umran Malik briefly stymied Sri Lanka's progress with a couple of wickets, before captain Shanaka's unbeaten knock of 56 off 22 balls pushed the visitors past 200 runs - a total that would prove to be enough on the night.
The third and final T20I of the series will be played in Rajkot on Saturday. The teams will then meet in a three-match one-day international series.