Dhananjaya de Silva and Kamindu Mendis became the third pair in Test history to score a century in both innings, as Sri Lanka set up a 511-run target for Bangladesh in the first Test Sunday.

The visitors were all out for 418 in their second innings at Sylhet, with Mendis making 164 runs to go with his 102 in the first innings and De Silva, who also scored 102 runs in the first innings, adding 108.

The Chappell brothers, Greg and Ian, of Australia achieved the feat against New Zealand in March 1974, before Misbah-ul-Haq and Azhar Ali emulated it against Australia in Abu Dhabi in 2014.

The pair, who shared 202 runs in Sri Lanka's first innings total of 280 runs, put on 173 runs together this time -- on their way to becoming the third and fourth Sri Lankans to score centuries in both innings against Bangladesh.

Mehidy Hasan Miraz broke their partnership, before finishing with 4-74 for Bangladesh.

Resuming on 119-5, the visitors lost nightwatchman Vishwa Fernando (four) early to Khaled Ahmed, before de Silva and Mendis took control.

De Silva brought his century into the game with a single off Mehidy, before he gave Bangladesh their first chance as Nahid Rana dropped him off Shoriful Islam on 101.

Mehidy ensured the drop did not hurt the team more, soon ending de Silva's innings, with Zakir Hasan taking the catch at short midwicket.

Mendis put away a full toss of Bangladesh captain Najmul Hossain Shanto to bring his own hundred off 171 balls just before the tea, when Prabath Jayasuriya was batting with him for 13.

Mehidy removed Prabath Jayasuriya, who made 25, and Lahiru Kumara off successive deliveries to give Bangladesh some relief.

Mehidy could have grabbed his fifth wicket if Liton Das did not drop Mendis on 133.

Mendis protected last man Kasun Rajitha to add 52 runs in the final wicket pair, piling misery on Bangladesh.

Mendis hit Taijul Islam for three sixes in an over to reach his 150 and help the lead exceed 500 runs. Taijul dismissed Mendis finally to wrap-up Sri Lanka's innings.

Sri Lanka have never lost a Test series to Bangladesh.

The second and final match of the series will be played in Chittagong from March 30.