The Pirates survived a weird ninth inning to beat the Red Sox 3-2 and clinch their second straight winning season.
The Bucs loaded the bases in their half of the first, and then Brandon Workman gave up a walk to Ike Davis to make it 1-0. The Red Sox tied the game in the top of the third on a single, a sacrifice, and then a ground-ball single by Mookie Betts.
In the fourth, the Pirates took a 2-1 lead when Davis singled, moved around to third on Jordy Mercer's double, and then scored on a single by Chris Stewart. Starling Marte followed with a solo homer the next inning to make it 3-1.
Boston drew within one on a sacrifice fly by Xander Bogaerts in the eighth inning shortly after the Pirates removed Gerrit Cole from the game. Cole struck out seven batters and walked none in a strong performance over seven innings.
Mark Melancon came on to pitch the ninth and hit leadoff batter Allen Craig, who was replaced on the base paths by Jemile Weeks. Daniel Nava then singled to move Weeks to third. Up came Will Middlebrooks, who grounded the ball toward Weeks at third. Weeks tried to get out of fair territory and back to the bag, but the Pirates caught a huge break as the ball hit him and he was called out. Melancon then struck out Jackie Bradley Jr. and got Christian Vazquez to ground out to end the game as the Pirates escaped with a sweep and their 82nd victory of the season.