
Mehidy Hasan Miraz claimed a five-wicket haul to help Bangladesh secure a narrow first-innings lead after Pakistan fought back strongly on the third day of the opening Test in Dhaka on Sunday.
Pakistan were bowled out for 386 in reply to Bangladesh's 413, leaving the hosts with a slender 27-run advantage at the Sher-e-Bangla National Cricket Stadium.
Bangladesh then reached seven without loss in their second innings before bad light ended play early, extending the overall lead to 34 runs with all 10 wickets intact.
Pakistan resumed the day on 179 for one and appeared poised to overtake Bangladesh after debutant Azan Awais continued his composed innings.
The young opener completed a superb century on debut before falling for 103, caught by captain Najmul Hossain Shanto off Taskin Ahmed after anchoring Pakistan's innings for much of the day.
Awais had added important partnerships with Abdullah Fazal and Salman Agha to frustrate Bangladesh's bowlers on a pitch offering little assistance.
Abdullah also impressed in his first Test appearance, scoring 60 before becoming one of five victims for off-spinner Mehidy, who finished with figures of five for 102.
Bangladesh briefly seized control when Mehidy removed Saud Shakeel for a duck and later dismissed Abdullah to reduce Pakistan from a comfortable position to 230 for five.
But Salman and Mohammad Rizwan launched another counter-attack with a 119-run partnership that threatened to wipe out Bangladesh's advantage completely.
Salman struck 58 before fast bowler Nahid Rana broke the stand, while Rizwan made 59 with eight boundaries before falling to left-arm spinner Taijul Islam.
Pakistan's lower order added valuable runs, but Bangladesh eventually wrapped up the innings late in the final session to preserve a crucial lead.
Taskin finished with two wickets, while Taijul supported Mehidy with two scalps of his own.
Bangladesh's openers then safely negotiated a brief but testing spell under fading light against Shaheen Shah Afridi and Mohammad Abbas before the umpires called stumps.
Mahmudul Hasan Joy was unbeaten on two alongside Shadman Islam on nought when play ended.
After dominating the opening day through Shanto's century and then conceding momentum to Pakistan on day two, Bangladesh regained a slight edge in a closely contested Test heading into the fourth day.