Captain Kraigg Brathwaite led the way before he was run out just shy of a century as West Indies edged ahead of Pakistan in the first Test in Jamaica.
West Indies had bowled out their opponents for 217 on the opening day of the two-match series, only to then slip to 2-2 late in Thursday's proceedings when Mohammad Abbas struck twice.
It seemed they could struggle to get even close to parity when they slipped to 100-5 during day two, but Brathwaite stood firm to make sure his side claimed a first-innings lead.
The opening batsman hit 12 fours as he patiently worked his way to 97 but, with a hundred in sight, was caught short by Hasan Ali's direct hit from fine leg to depart.
Jason Holder contributed 58 as he added 96 for the sixth wicket with the man who replaced him as skipper, the former's fluent 108-ball knock including 10 boundaries.
Abbas dismissed Kemar Roach lbw in the closing overs, giving him figures of 3-42 in the match, while Shaheen Shah Afridi ended with 2-59.
However, Joshua Da Silva was unbeaten on 20 alongside Jomel Warrican, who will resume on one not out, as West Indies closed at 251-8, already holding what could be a crucial 34-run advantage in a potentially low-scoring contest.
Coming up short
Brathwaite appeared to be working his way towards a 10th Test century and a second of the calendar year, having made 126 against Sri Lanka back in March. While unable to make it to the milestone in the end, his defiant innings made sure West Indies hold the upper hand at Sabina Park.
Afridi strikes twice but hosts recover
Pakistan will feel they let West Indies off the hook, particularly after Afridi dismissed Jermaine Blackwood – whose ambitious attempt to hit over the top on 22 only found Abbas at mid-on – and Kyle Mayers with successive deliveries in the second session. They will hope to wrap up the tail quickly on day three.