ST. PETERSBURG, Fla. — Perhaps the Boston Red Sox will look back at this weekend as the games that got their title defense back on track.

The World Series champions won a series for the first time this season when Andrew Benintendi hit a sacrifice fly in the ninth inning and catcher Christian Vazquez picked off Tommy Pham for the final out in a 6-5 win over the Tampa Bay Rays on Saturday night.

“These are the games that we expect to win, and the last two days we’ve grinded out at-bats and came out on top,” said Benintendi, who gave the Red Sox a 5-0 lead with a grand slam in the second inning. “We’ll figure some things out and once we hit our stride, it will be a lot more fun.”

Boston had lost four of its first six series and split the other two during a 6-13 start, its worst since 1996. The Red Sox beat the AL East-leading Rays 6-4 in Friday night’s series opener.

Rick Porcello gave up two runs and six hits in 5 2/3 innings, Matt Barnes (2-0) got the win after allowing Yandy Diaz’s tying home run leading off the eighth, and Ryan Brasier earned his fifth save in six chances.

Daniel Robertson singled leading off in the ninth and Pham singled with two outs. With Willy Adames at the plate and Steve Pearce playing behind Pham at first base, Vazquez attempted a pickoff throw as Pearce broke for the bag, caught the throw and tagged out Pham.

“I saw on the foul ball on the pitch before he had a big lead and I gave the sign to Pearce,” Vazquez said. “Why not? If Adames got a hit, it’s a tie game. We got the chance and we did it.”

Boston went ahead in the ninth against Jose Alvarado (0-1) after Jackie Bradley Jr. singled leading off. Michael Chavis made his major league debut as a pinch hitter and doubled with one out, and Benintendi followed with his sacrifice fly.

Chavis spent his first full day with the Red Sox after his delayed flight from Syracuse caused him to arrive in the third inning Friday night.

“I’ll be honest, I don’t know what today is,” Chavis said. “I flew out yesterday at 1; they told me (I was getting called up) at 11. I literally woke up to three missed phone calls, and I thought I messed something up. They said, ‘You’re going to the big leagues,’ and I was like, ‘No way.’ ”

Tampa Bay had won its first six series of the season. The Red Sox won consecutive games for just the second time this year.

Benintendi homered off Charlie Morton in a five-run second after Sandy Leon was hit by a pitch with the bases loaded.

Avisail Garcia hit a solo homer in the second, and Brandon Lowe drove in a run in the fourth with one of Tampa Bay’s franchise-record four triples. Boston had not allowed four triples in a game since June 9, 1983, against Detroit. Austin Meadows hit a two-run triple in the seventh, and Kevin Kiermaier and Ji-Man Choi also tripled for the Rays.

Morton struck out nine while giving up five runs and six hits in six innings.

Boston was looking forward to Sunday’s series finale.

“We haven’t had a chance to say it all season, but now we’ve got a chance to sweep somebody,” Red Sox Manager Alex Cora said.

TRAINER’S ROOM

Red Sox: First baseman Mitch Moreland left in the third inning because of back spasms.

Rays: Left-hander Blake Snell (fractured right fourth toe) threw 18 pitches in his first bullpen session and is to throw another bullpen session Monday. Manager Kevin Cash didn’t rule out the 2018 AL Cy Young Award winner from returning Wednesday or Friday. … Cash said infielder Joey Wendle (strained left hamstring) is ready to be reinstated from the 10-day IL but hasn’t been yet because of a need for pitchers on the roster.