Justin Greaves bowled five consecutive wicket maidens on his way to 5-27 as Pakistan lost 6-38 after Shan Masood completed his seventh Test century.
Mohammad Abbas then took 3-14 in 13 overs to reduce West Indies to 7-126 at stumps on Tuesday (Wednesday AEST).
Kemar Roach (8 not out) and Shamar Joseph (22no from 13 balls) were left holding the fort for the home side who were clearly trying to push the total lead close to 200, which would be a difficult fourth-innings chase.
"In the first innings, on the first day, we couldn't execute our plans. We were a touch short, but on second and third day, the plan was to pitch it up and it worked very well," Pakistan's bowling coach Umar Gul said.
Pakistan were 4-244 prior to Masood's dismissal, making strong inroads into West Indies' first innings of 311. But when he fell for 109 in his first Test dig since being relieved of the captaincy, the tourists slumped to be all out for 282.
Abbas then produced another outstanding new-ball spell to dismiss both Brandon King (5) and Kavem Hodge (0) to leave West Indies 2-7 in the fifth over. When Mohammad Ali caught Amir Jangoo (4) off his own bowling and Khurram Shahzad bowled Shai Hope (10), West Indies were 4-43 and the second collapse of the day was in motion.
Opener Tagenarine Chanderpaul (35) provided some resistance before he fell to Aamer Jamal, then Abbas returned to dismiss Greaves (20) and Shahzad nicked out captain Roston Chase (8).
Pakistan started day three at 3-199 and Masood reached his century from 163 balls after resuming at 88.
Everything changed when Joseph bowled Salman Agha (20) with a superb delivery which seamed past the outside edge.
Greaves removed Masood with a ball that cannoned onto the stumps from an inside edge. Jamal (3) missed a straight delivery from Greaves, and in quick succession Ali Usman (0) fell lbw and Mohammad Rizwan (12) was caught by wicketkeeper Hope to leave Pakistan 8-259 before lunch.
Greaves had Abbas caught behind for his fifth wicket and Pakistan's innings ended soon after when Roach dismissed Shahzad (19).
"The ball nipped around and I got some reward," Greaves said.
"Anytime I get the ball in hand the team looks to me to be that solid player for them, (and) try to dig us out of situations.
"To get five wickets for the first time in Test cricket, I'm really happy, but there's still a lot of work to do in the game."