The 26-year-old bowler dismissed Hardik Pandya, Suresh Raina and Yuvraj Singh off successive deliveries in the penultimate over of the Indian innings to achieve the feat at Ranchi's JSCA International Stadium.
Australian Brett Lee and the New Zealand duo of Jacob Oram and Tim Southee have also claimed hat-tricks in Twenty20 internationals.
However, even Thisara's hat trick could not prevent India from winning the second T20I by 69 runs and leveling the three-match series 1-all.
India put into bat first raced to 196-6 powered by an opening stand of 75 off seven overs by Rohit Sharma (43) and Sikhar Dhawan (51) and it was only Perera's hat-trick in the penultimate over that prevented the home team from crossing the 200-run mark.
Sri Lanka were restricted to 127-9 with four batsmen being dismissed without scoring.
(Excerpts from Reuters)