Pakistan's Mohammad Hafeez made a century but West Indies restored some of their battered pride with a rain-affected win in the fourth one-day international (ODI) in Barbados on Monday.
Dwayne Bravo struck a six in the final over before a downpour finished off the game, giving Darren Sammy's team victory by one run through the Duckworth-Lewis scoring method.
Pakistan lead the five-match series 3-1.
It is the first time West Indies have beaten a Test side, other than Bangladesh, in an ODI since June 2009.
Pakistan compiled 248 for nine in 50 overs, Hafeez smashing seven fours and three sixes as he hit 121 from 138 balls before being bowled by leg-spinner Devendra Bishoo.
Bishoo was again the top wicket-taking threat for West Indies, snapping up three for 37 in 10 overs.
The key partnership for Pakistan was a second-wicket stand of 153 from Hafeez and Asad Shafiq (71).
"After the way Mohammad Hafeez and Asad Shafiq played on a difficult pitch I think we should have got 270-275. We didn't bat well at the end," said skipper Shahid Afridi.
Rain meant West Indies chased a reduced target of 223 from 39 overs and they lost opener Kirk Edwards to the second ball of the innings, caught behind for a duck by Mohammad Salman off Junaid Khan.
Lendl Simmons (76) then struck his third half-century of the series and was helped by Darren Bravo (21) and the recalled Ramnaresh Sarwan (28).
With Marlon Samuels and Dwayne Bravo at the crease and rain closing in, instructions were given from the pavilion as Afridi bowled what turned out to be the 30th and final over.
Bravo pulled a short delivery over mid-wicket for six which put the home side just ahead of the Duckworth-Lewis target and they played back two balls before the heavens opened and a total of 154 for four from 29.5 overs was enough for the win.
The series concludes on Thursday in Guyana before the two teams meet in a pair of five-day Test matches.
Mohammad Hafeez b Bishoo 121
Ahmad Shehzad c Dwayne Bravo b Roach 6
Asad Shafiq c Simmons b Dwayne Bravo 71
Shahid Afridi c Rampaul b Roach 8
Misbah-ul-Haq b Bishoo 5
Hammad Azam c Roach b Bishoo 1
Usman Salahuddin run out 5
Mohammad Salman run out 0
Tanvir Ahmed b Dwayne Bravo 18
Saeed Ajmal not out 5
Junaid Khan not out 1
Extras: (LB-1, W-5, NB-1) 7.
Total: 248-9 (50 overs).
Fall of wickets: 1-15, 2-168, 3-182, 4-210, 5-219, 6-220, 7-220, 8-236, 9-244.
Bowling: Kemar Roach 10-0-67-2, Ravi Rampaul 10-2-37-0, Dwayne Bravo 10-0-60-2, Darren Sammy 10-0-46-0, Devendra Bishoo 10-0-37-3.
West Indies Innings:
Lendl Simmons c Salahuddin b Tanvir 76
Kirk Edwards c wk Salman b Junaid 0
Darren Bravo c Tanvir b Junaid 21
Ramnaresh Sarwan c Junaid b Hafeez 28
Marlon Samuels not out 8
Dwayne Bravo not out 11
Extras: (LB-1, W-5, NB-1) 7.
Total: (29.5 overs) 154-4.
Fall of wickets: 1-1, 2-57, 3-132, 135.
Bowling: Junaid Khan 6-0-26-2, Tanvir Ahmed 6-0-45-1, 6.5-0-32-0, Saeed Ajmal 4-0-16-0, Mohammad Hafeez 6-0-26-1, Hammad Azam 1-0-9-0.