ST. PETERSBURG, Fla. (AP) -- Brad Miller hit a tiebreaking, two-run homer in the eighth inning and the Tampa Bay Rays took three of the four from AL East-leading Boston, beating the Red Sox 5-3 Sunday.
Miller connected with two outs off Joe Kelly (3-1), sending a drive over the center field wall. Kelly had made a career-best 23 straight scoreless appearances.
Brad Boxberger (1-0) worked out of a two-on, two-out jam in the eighth before Alex Colome got three outs for his 25th save.
Tampa Bay, at 47-43, has 13 more wins than last year at the All-Star break and trails the Red Sox by 3 1/2 games.
Dustin Pedroia hit his second homer in three days and fourth of the year during the seventh off AL All Star Chris Archer, a two-run shot that put Boston up 3-2. It was the fourth time this season that an opponent hit a go-ahead homer against Archer in the sixth or seventh inning.
Mookie Betts homered on Archer's third pitch of the game to set a Red Sox record with his 11th career leadoff homer.
Tampa Bay tied it at 3 in the seventh on Corey Dickerson's sacrifice fly.
Archer, who gave up three runs and eight hits in 6 2/3 innings, and one-time Rays ace David Price both had effective starts.
Price allowed two runs and five hits over six innings. He entered with a 19 1/3-inning scoreless streak against his former team.
Steven Souza Jr. hit a leadoff double in the Rays first and scored on Evan Longoria's single.
Longoria got his 53rd RBI, his most at the All-Star break since 2013 (52), on a third-inning sacrifice fly.
Boston had two on in both the third and fourth but failed to score. Souza made a full-extension diving catch in the fourth on Christian Vazquez's right-field foul drive.
Hanley Ramirez, who failed to tag up at second on Souza's catch, was doubled up at first in the sixth after Dickerson made a leaping catch at the left-field wall on fly ball by Jackie Bradley Jr.
Red Sox: LHP Eduardo Rodriguez (right knee) allowed one run over 6 1/3 innings in his third rehab appearance at Triple-A Pawtucket and is scheduled to start against Toronto on July 17. … INF Brock Holt (vertigo) is nearing a return but will remain with Triple-A Pawtucket this week.
Rays: SS Adeiny Hechavarria was out of the lineup due to a groin injury but entered as a defensive replacement in the eighth.
Red Sox: Betts, LHP Chris Sale and RHP Craig Kimbrel will participate in Tuesday night's All-Star Game in Miami.
Rays: Dickerson will join Archer at the All-Star Game. Manager Kevin Cash will be the AL bench coach.