An opening stand of 155 between Azhar Ali and Ahmed Shehzad gave Pakistan the upper hand in the second Test with West Indies in Barbados, although the hosts were boosted by a late fightback on day two.
After the Windies had collapsed to 312 all out, Azhar (81 not out) and Shehzad (70) laid the platform for a strong reply, the latter riding his luck as he was twice dismissed off no-balls after being dropped early in his innings.
West Indies were unable to shift Azhar, who also endured a few nervy moments, before stumps, but Shehzad fell in the evening session when he was caught at slip off Devendra Bishoo.
The wicket triggered a mini-collapse that saw Babar Azam and Younis Khan each register ducks, yet Pakistan were still on top at 172-3 - trailing by 140 - when bad light forced an early close.
Monday started promisingly for Pakistan, who lead the three-match series 1-0, as they made swift work of wrapping up West Indies' first innings.
Roston Chase (131) and Jason Holder (58) had shared 132 for the seventh wicket the previous day to lead their side to 286-6, but neither man could add to their score on the second morning.
Holder was caught behind off Mohammad Abbas from the third ball of the day and Chase edged Mohammad Amir to Younis at second slip in the next over.
Another burst of two wickets in as many overs brought an end to the innings, Abbas having Bishoo held at mid-on to finish with 4-56 before Yasir Shah bowled Alzarri Joseph.
Shehzad's first let-off came when he had just three runs to his name as Vishaul Singh failed to take a chance off Shannon Gabriel, diving forward after coming in from mid-on.
Gabriel then had Shehzad trapped in front for 21, but the opener called for a review that showed the paceman had over-stepped.
After the patient Azhar had brought up his 50 with a swept four off Bishoo, there was yet another stroke of luck for Shehzad, who was stumped down the leg side off Chase only for another no-ball to be called.
West Indies' frustration increased when a review against Shehzad proved misguided, a delivery from Chase projected to drift past leg.
However, a wicket finally arrived when Bishoo got a delivery to turn sharply and find Shehzad's edge.
Gabriel then had Azam caught and bowled and Younis pulled a Bishoo long hop straight to midwicket, before Misbah-ul-Haq dug in alongside Azhar in the overs that remained.