Fast bowlers Mustafizur Rahman and Subashis Roy also each claimed a wicket apiece as the visitors made early inroads in their quest to draw level in the second match of a two-Test series.
Mustafizur gave the visitors a dream start in the milestone Test when he forced an edge from opener Dimuth Karunaratne, having cranked up the pressure on the batsmen by bowling three successive maidens.
Mehedi then struck in his third over, enticing Kusal Mendis out of his crease before Mushfiqur Rahim completed the stumping.
Mendis was man-of-the-match in the first Test in Galle after scoring 194 but he departed this time having scored just five.
Also Read
Sri Lanka's troubles deepened when Upul Tharanga edged Mehedi to Soumya Sarkar at slip for 15 after earlier being given a reprieve by a television replay when he was given out lbw off Mustafizur for six.
Dinesh Chandimal, unbeaten 27 at lunch, and Asela Gunaratne tried to revive the innings but Subashis struck on the stroke of lunchtime when he trapped Gunaratne lbw for 13.
Captain Mushfiqur returned to wicketkeeping duties while batsman Mosaddek Hossain was handed his Test debut.
Imrul Kayes, Sabbir Rahman and Taijul Islam were also called up to the Bangladeshi starting line-up with Mominul Haque, Mahmudullah and Taskin Ahmed making way.
Sri Lanka made one change to the team that won the first Test in Galle bringing in Dhananjaya de Silva for Lahiru Kumara.
Disclaimer: No Business Standard Journalist was involved in creation of this content