BOSTON — Junichi Tazawa showed Asdrubal Cabrera the same pitch once too often.

Cabrera hit a game-tying RBI double and scored on James Loney’s single in the eighth inning, and the Tampa Bay Rays avoided a three-game sweep with a 4-3 comeback victory over the Boston Red Sox on Sunday.

“Today, five consecutive fastballs to Asdrubal, which is a little bit uncommon for (Tazawa), and the last one (moved) back over the plate,” Red Sox Manager John Farrell said.

Tazawa’s rough eighth inning wasted a solid start by Wade Miley, who held the Rays to two runs over 62/3 innings.

Evan Longoria opened the eight inning with a double off the Green Monster against Tazawa (2-4). One out later, Cabrera hit his ground-rule double over the head of right fielder Rusney Castillo. Loney followed with a bloop hit to center.

“There’s nothing physically wrong. I don’t feel fatigue or anything,” Tazawa said through a translator. “It’s just that I’ve let the lead runner get on the bases and that obviously makes it tough to get a clean inning.”

David Ortiz had an RBI double for the Red Sox, passing Hall of Famer Andre Dawson for 37th place with his 1,592nd RBI.

Miley gave up five hits while striking out four and walking one in his season-high 120-pitch effort before being lifted after Kevin Kiermaier’s two-out triple in the seventh.

Robbie Ross Jr. relieved and hit the first batter, then issued a walk to load the bases, but he struck out Joey Butler swinging.

Brandon Guyer opened the game with a homer for the Rays, who had lost 13 of their last 16 road games.

Steve Geltz (2-4) got the victory, retiring the only batter he faced. Brad Boxberger, the fourth reliever, struck out the final three batters for his 26th save.

Jake Odorizzi gave up three runs in six innings.

The Red Sox scored twice in the bottom of the first to move ahead 2-1. Hanley Ramirez had an RBI double and scored on Mike Napoli’s single.

They made it 3-1 in the third on Ortiz’s double after Xander Bogaerts was hit by a pitch.

Tampa Bay sliced it to 3-2 in the fourth on Loney’s two-out RBI double into the right-field corner.

Guyer homered on the fifth pitch, hitting a shot that caromed off a billboard above the Monster seats.

NOTES: Tampa Bay placed outfielder Steven Souza Jr. on the 15-day disabled list after he broke his left hand getting hit by a fastball from Joe Kelly on Saturday. Manager Kevin Cash said he’s expected to miss 4 to 6 weeks. …

Boston finished a 10-game homestand 5-5. The Red Sox play three games at the New York Yankees, three at Detroit and two in Miami before returning to Fenway Park on Aug. 14 against Seattle. …

Ramirez’s bat flew into the stands about 20 rows behind the Rays’ on-deck circle, but no one was injured. He had a security guard give another bat to a fan after getting back the one he was using.