Inzamam-ul-Haq's 22nd Test hundred set it up, and a handful of late wickets mostly for Danish Kaneria, including the prized scalps of Brian Lara and Shivnarine Chanderpaul, put Pakistan on the verge of a series-levelling victory in their compelling second and final Test against West Indies on Monday.
Chasing 280 runs to win, Kaneria collected four wickets for 37 runs from 14 overs, as West Indies slumped to 114 for six when bad light stopped play six overs early on an action-packed, rain-affected penultimate day at Sabina Park.
Inzamam capitalized on his good fortune to complete his fourth Test hundred against West Indies, a purposeful, undefeated 117, that was the cornerstone of his side's second innings total of 307.
Fast bowler Tino Best kept West Indies in the game when he collected a Test-best four for 44 from 12 overs, and Corey Collymore ended with four for 56 from 16.5 overs to claim the best match figures in the 41 Tests played at Sabina Park of 11 for 134.
As easily as Best and Collymore brought West Indies back into contention, Kaneria again shut the door on them with the wickets of Ramnaresh Sarwan, Lara and West Indies captain Shivnarine Chanderpaul in the space of nine balls in successive overs.
After a two-and-a-half-hour break for bad light and rain, Kaneria had Ramnaresh Sarwan hit wicket for eight when the batsman tried to turn an awkwardly bouncing delivery into the leg-side in the third over after the resumption.
In his next over, Kaneria removed Lara when the West Indies' batting kingpin was caught down the leg-side for a five-ball duck.
Kaneria should have had Chanderpaul for a first-ball duck, when the left-handed batsman whipped a delivery hard into the mid-rift of short leg fielder Asim Kamal, who failed to grasp the sharp chance.
The players left the field for bad light a second time for about 15 minutes, but when play resumed, the leg-spin bowler did not have to wait too long to put Chanderpaul out of operation.
Chanderpaul was adjudged lbw for a three-ball duck pulling across the line of a flatter, faster delivery, but television replays seemed to suggest there should have been some element of doubt, since the ball appeared to strike him outside the line of off-stump.
West Indies were in tatters at 56 for four, but Smith spent close to an hour with fellow left-hander Wavell Hinds adding 38 for the fifth wicket before he failed to pick Kaneria's googly and was caught behind for the top score so far of 49 that contained seven fours from 109 balls in close to two-and-a-half hours.
In fading light, Abdul Razzaq added the scalp of Wavell Hinds caught at second slip for 19 for good measure, and Kaneria could have claimed his fifth had slip fielder Younis Khan held a sharp chance when Courtney Browne edged to his left playing defensively forward.
Earlier, Inzamam, who was fortunate to have been dropped first ball the previous evening, dug in deep to fashion one of the most important hundreds of his illustrious career.
Inzamam glanced Reon King to the deep fine leg boundary for four about 25 minutes before lunch to arrive at his landmark.
Minutes earlier, fortune had again smiled on Inzamam, when on 92 he was caught behind off King, only to be saved by a loud bellow of "no-ball" from umpire Darrell Hair.
Inzamam spent four hours at the crease to smite 14 boundaries from 194 balls to hold things together for Pakistan, despite Best's efforts to bring a swift conclusion to their second innings.