J.D. Martinez drove in four runs, including two on a go-ahead double in the sixth inning, and the Boston Red Sox outlasted the slumping Kansas City Royals 7-6 on Tuesday on a sweltering night at Fenway Park.

The Red Sox, who had four homers in each of their previous two games, won their fifth straight despite not going deep Tuesday.

"We put in good at-bats," manager Alex Cora said. "The line is moving. We're walking, too. We've been controlling the strike zone. We're doing a lot of good things offensively. "

The result was 12 hits, one fewer than the pesky Royals had as they pushed to end a six-game slide. Boston pitchers allowed three homers by the Royals for the second straight game, but Kansas City's skid continued with its seventh loss in a row.

"If there's something positive to take away from tonight, we kept battling. We kept finding ways to get runners on. Guys had a lot of big hits," said Ryan O'Hearn, whose two-run homer to center in the fifth put the Royals up 6-5.

Whit Merrifield led off the game with a homer for Kansas City off Nick Pivetta. Michael A. Taylor and O'Hearn each hit two-run shots for the Royals, who fell to 1-7 on a 10-game road trip that concludes Thursday afternoon in Boston.

The clubs combined for 25 hits in the game, which stretched more than 3 1/2 hours in sweltering conditions that only eased slightly from a game-time temperature of 95 degrees.

"It was really hard to get a grip on the baseball. My whole uniform was soaked before the first inning even started," said Royals starter Brad Keller, who threw 102 pitches over five-plus innings. "It was tough because I felt like rosin wasn't doing a whole lot and neither was the dirt."

Yacksel Rios (2-0) got the win with 1 2/3 scoreless innings of relief. Matt Barnes pitched a perfect ninth for his 18th save.

After Merrifield put the Royals up right away, the lead changed hands six more times before Martinez lined a double to right in the sixth with two runners on. Michael Chavis and Alex Verdugo scored easily and the 7-6 lead held.

Martinez also had an RBI single in the first and drove in a run on a sacrifice fly during Boston's two-run fourth. Every Red Sox player in the starting lineup finished with at least one hit.

Keller faced one batter in the sixth before being replaced by Jake Brentz after Bobby Dalbec hit a leadoff single to left. Brentz (2-1) couldn't hold the lead, walking Verdugo and putting two runners on for Martinez, whose double to right put Boston back up. Brentz allowed one run and one hit, walked one and struck out three.

FROM THE START

Pivetta, who pitched 6 2/3 innings of hitless ball last Thursday at Tampa Bay, got tagged right away Tuesday when Merrifield belted a 2-2 fastball out to right for his 10th career leadoff homer.

Pivetta went 4 1/3 innings, allowing six runs and nine hits. He walked two and struck out five before being pulled after O'Hearn's two-run homer put Kansas City back up 6-5.

"I've really got to bounce back from this one. I needed to go deeper into the ballgame. I need to give more innings so we can give the bullpen a little more of a rest there," Pivetta said. "But at the end of the day the bullpen picked me up, the hitters picked me up all game as they did and we came out with the win."

TRAINER'S ROOM

Royals: Placed RHP Wade Davis (right forearm strain) on the 10-day injured list, retroactive to Sunday. Kansas City also recalled LHP Richard Lovelady from Triple-A Omaha. ... Hanser Alberto replaced Emmanuel Rivera at third base in the bottom of the second. Rivera, who singled in his first two at-bats Monday night while making his major league debut, left Tuesday's game because of pain in his left wrist, the Royals said.

Red Sox: LHP Chris Sale, who is recovering from Tommy John surgery he had in 2020 and pitched to batters over the weekend, is scheduled to throw again Wednesday, Cora said. "The live BPs are great, but how he feels the next day is the most important thing and so far, in between that live BP and up to now, he's feeling amazing," Cora said. "He'll go through his work tomorrow and we'll see how he reacts on Thursday."

UP NEXT

Royals LHP Mike Minor (6-5, 5.12 ERA) held the Red Sox to two runs over 6 2/3 innings while picking up the win on June 20 in Kansas City. Minor will face Boston lefty Martin Perez (5-4, 4.09).

More From 92.9 The Ticket