Subashis Roy was made to pay a heavy price for delivering a no-ball as Kusal Mendis capitalised on an early reprieve to strike 166 not out on day one of the first Test between Sri Lanka and Bangladesh.
Mendis dominated the opening day in Galle, sharing 196 with Asela Gunaratne (85) as Sri Lanka recovered from 92-3 to reach stumps on 321-4 after choosing to bat.
However, the centurion was almost dismissed without scoring a run when he edged the first delivery he faced through to wicketkeeper Liton Das, only for replays to show Subashis had overstepped.
Mendis took full advantage of his good fortune and brought up his second Test hundred in style with a straight-driven four off Soumya Sarkar.
At the close on Tuesday, he had hit 18 fours and two sixes to move within 10 of his record Test score - the 176 he made against Australia in Pallekele last July.
Subashis' lapse in discipline denied him a second wicket in as many balls, after he had bowled Upul Tharanga for four in the sixth over of the match.
Bangladesh did claim another breakthrough in the morning session, Dimuth Karunratne (30) playing on when looking to cut Mehedi Hasan, and Dinesh Chandimal fell cheaply to Mustafizur Rahman after lunch, having used up 54 balls in making five.
That was to be as good as things got for the tourists, however, as Mendis and Gunaratne counter-attacked in an attractive fourth-wicket stand that put Sri Lanka firmly in control.
In only his third Test, Gunaratne was able to continue the impressive form he showed in limited-overs matches against South Africa and Australia last month, striking seven fours in his 134-ball innings.
The batting all-rounder was denied a hundred by Taskin Ahmed, who induced a drag on with the second new ball, but Mendis would not be shifted and saw out the remaining overs alongside wicketkeeper Niroshan Dickwella (14no) to compound Subashis' misery.