Shakib Al Hasan claimed five wickets to help dismiss Australia for 217 and give Bangladesh the upper hand on the second day of the opening Test, here today. Australia, who resumed the day on a precarious 18-3, were bowled out early in the final session for 217 to hand the hosts a 43-run first-innings lead. By stumps they had increased that to an 88-run advantage for the loss of one wicket. Shakib, who finished with 5-68 and also top-scored in Bangladesh's first innings with 84, was ably supported by off-spinner Mehedi Hasan. Mehedi claimed three wickets for 62 including the prized scalp of skipper Steve Smith for eight. The hosts reached 45-1 at stumps in their second innings,with opener Tamim Iqbal on 30 and nightwatchman Taijul Islam yet to score. Slow left-armer Ashton Agar ended a confident 43-run opening stand when he had Soumya Sarkar (15) caught by Usman Khawaja at long-on after several attempts. Australia also had Agar to thank for helping get them close to Bangladesh's first innings total of 260 after their regular batsmen struggled against spin. Agar, batting at number nine, made an unbeaten 41 and shared a crucial stand of 49 with Pat Cummins, taking Australia past the 200 mark after Shakib and Mehedi had the visitors on the ropes. Agar and Cummins came together after Mehedi had Matthew Wade plumb leg-before for five and Shakib drew Glenn Maxwell forward for a stumping on 23 to leave Australia struggling on 144-8. When he was on 11 Cummins survived a dropped catch by Shafiul Islam at cover off Shakib and was then reprieved by the third umpire after being given out caught behind. Shakib finally bowled Cummins for 25 in the evening session and then had Josh Hazlewood caught by Imrul Kayes at short leg to end Australia's innings and complete his 16th five-wicket haul in Tests -- at least one against each of the nine Test teams he faced. But the left-handed Agar frustrated the Bangladesh bowlers during a 97-ball stay at the crease that included two fours and a six. The 23-year-old took the attack to the opposition but ran out of partners.