It took all weekend, but the Boston Red Sox finally cooled off the Tampa Bay Rays.

The Rays took the first two games of the three-game set at Fenway Park, extending their winning streak to eight games. And it looked like they would make it nine in a row early Sunday when they took a 3-0 lead against Rick Porcello.

But the Red Sox didn’t let the early deficit get to them, as they strung together a rally to tie the game in the sixth inning and took the lead on a two-out RBI single from Sandy Leon in the eighth inning.

Tampa Bay threatened to break the Sox’s hearts in the ninth, putting runners on second and third with one out. Luckily for Boston, closer Craig Kimbrel was able to strike out Jesus Sucre and Carlos Gomez to give Boston the win.

With the win, the Red Sox improve to 20-7, while the Rays fall to 12-14.

Here’s how it all went down:

GAME IN A WORD
Salvage.

Boston looked like it was doomed to get swept when the Rays took an early 3-0 lead, but the Sox rallied late to take the final game of the series.

ON THE BUMP
— Porcello had another solid outing Sunday. The righty tossed 7 2/3 innings, allowing three runs on seven hits while striking out six.

The Rays took a 2-0 lead in the third inning when Denard Span hammered a changeup from Porcello into the bullpen in right-center field. It was the first home run that the Sox righty has allowed this season. Tampa Bay tacked on another run in the fourth when Mallex Smith ripped a two-out, RBI single to right to score Brad Miller and make it 3-0.

Porcello ran into trouble in the seventh inning when the Rays put runners on first and second with one out, but the right-hander was able to wiggle out of the jam and keep the game tied at three. He got the first two outs of the eighth before being pulled after giving up a single to C.J. Cron.

— Craig Kimbrel came on in relief of Porcello and got the final out of the eighth inning. The ninth inning was a tad rocky for the hard-throwing righty, as the Rays put the first two men on via a single and an error. The runners moved to second and third on a sacrifice bunt, but Kimbrel fanned Sucre and Gomez to end the game.

IN THE BATTER’S BOX
— Boston finally broke through in the sixth inning. Eduardo Nunez led off the inning with a single, Andrew Benintendi followed with a walk and Hanley Ramirez rolled a single through the left side to load the bases. J.D. Martinez came through with a two-run single to left to make it 3-2.

The Red Sox tied the game later in the sixth when Jackie Bradley Jr. drove in Ramirez with a sacrifice fly to right field. Boston was unable to take the lead, however, as Sergio Romo got Tzu-Wei Lin to fly out to right field to end the inning.

— The tie¬†was broken in the bottom of the eighth inning when Sandy Leon ripped a two-out, RBI single down the left-field line to score Martinez from second and make it 4-3.

— Martinez went 4-for-4 with four singles and two RBI.

— Mitch Moreland, Rafael Devers, Benintendi and Lin all went hitless.

TWEET OF THE GAME
Is that good?

UP NEXT
The Red Sox will open a three-game series with the Kansas City Royals on Monday at Fenway Park. Eduardo Rodriguez will take the hill for Boston, while the Royals will counter with Jason Hammel. First pitch is set for 7:10 p.m.

Thumbnail photo via Winslow Townson/USA TODAY Sports Images