PHILADELPHIA — Pinch-hitter Ty Kelly doubled home the only run in the eighth inning of a duel between Philadelphia’s Nick Pivetta and Chris Sale to lead the Phillies over the Boston Red Sox on Thursday night.

Sale (8-3) was cruising until a one-out single by Andrew Knapp and Kelly’s hit, which ended an eight-game losing streak.

Sale allowed four hits with 10 strikeouts, upping his major league-leading total to 136. It was his 44th career double-digit strikeout game and ninth this season.

Pat Neshek (2-1) pitched a scoreless inning, and Hector Neris earned his sixth save with a hitless ninth.

NATIONALS 8, METS 3

NEW YORK — Bryce Harper hit a solo homer that sailed over right fielder Jay Bruce and landed about a dozen rows deep. Harper’s 17th home run left the bat at 116.3 mph, his hardest-hit ball since Statcast began tracking in 2015.

Daniel Murphy added three more hits against his former team and Michael A. Taylor hit the Nationals league-leading 100th home run to cap a five-run fifth. Manager Dusty Baker won on his 68th birthday, while Gio Gonzalez (6-1) improved to 10-1 at Citi Field, giving up two runs and five hits in seven innings

Robert Gsellman (5-4) was tagged for seven runs and 11 hits in five innings.

ATHLETICS 8, YANKEES 7, 10 INNINGS

OAKLAND, Calif. — Khris Davis blooped a two-run single in the 10th inning that glanced off second baseman Starlin Castro’s glove in shallow center and Oakland beat New York in a seesaw game.

It was Davis’ third career game-ending hit and came after Castro had put the Yankees ahead in the top half on a sacrifice fly.

Davis’ game-winner came off Giovanny Gallegos (0-1) to finally close out the 4-hour, 29-minute game. Rajai Davis singled with two outs and Chad Pinder’s double put runners on second and third.

Liam Hendriks (3-1) pitched the top of the 10th for the win on a night New York stranded 13 baserunners and Oakland 12.

The A’s had failed to hold their leads all game, then came through to snap a three-game skid with just their second victory in the last eight.

BREWERS 6, CARDINALS 4

ST. LOUIS — Eric Thames hit a tiebreaking, two-run homer in the ninth off Seung Hwan Oh (1-3), Thames’ 18th home run this season.

Keon Broxton tied the score 2-2 in the second with a 489-foot drive to left, the longest home run in Busch Stadium III’s history and the second-longest this season in the major leagues behind the Yankees’ Aaron Judge at 495 feet.

Carlos Torres (3-4) pitched scoreless inning, and Oliver Drake got his first big league save.

TIGERS 5, RAYS 3

DETROIT — Miguel Cabrera hit a two-run homer in the ninth off Tommy Hunter (0-2).

Justin Wilson (3-2) won with a scoreless inning. Justin Verlander pitched seven innings, allowing two runs, six hits and five walks..

INDIANS 12, DODGERS 5

CLEVELAND — Pinch-hitter Lonnie Chisenhall connected for a three-run homer and had five RBIs, stopping the Dodgers’ six-game winning streak.

Chisenhall’s 415-foot drive in fifth inning on the second pitch from Ross Stripling opened up a four-run lead for Josh Tomlin (4-8), who struggled after being staked to a 5-0 lead. Chisenhall added a two-run single in the sixth.

Edwin Encarnacion homered off Rich Hill (3-3), who gave up seven runs and eight hits in four innings.

TWINS 6, MARINERS 2

MINNEAPOLIS — Chris Gimenez homered twice for the first time in his big league career, and Eduardo Escobar sparked a five-run first inning for Minnesota with a two-run shot.

Jose Berrios (6-1) allowed five hits in a career-best eight innings to win his third straight start.

Gimenez hit a three-run homer in the first off Ariel Miranda (6-3), who lost for the first time in 10 starts for the Mariners and lasted only four innings with 10 hits and six runs allowed.

WHITE SOX 5, ORIOLES 2

CHICAGO — Rookie Matt Davidson homered for the fourth straight game, then doubled and scored in a four-run sixth to send Baltimore to its seventh loss in eight games.

Davidson hit a solo homer in the fourth, his 14th home run this season.

Caleb Joseph’s RBI double in the fifth tied the score 1-1, but Melky Cabrera hit a two-run single in the sixth that chased Chris Tillman (1-5), who lost his fifth straight start, allowing five runs and 11 hits in 5 1/3 innings.

Anthony Swarzak (3-1) gave up two hits in 1 2/3 scoreless innings.

ROCKIES 10, GIANTS 9

DENVER — Raimel Tapia hit a run-scoring single in the bottom of the ninth inning and Colorado recovered from blowing a late lead to beat San Francisco.

Nolan Arenado doubled three times and drove in four runs, while D.J. LeMahieu added four hits and an RBI for the Rockies. They won for the 10th time in 14 games this month despite allowing the Giants to come back from an eight-run deficit earlier in the game.

Mark Reynolds began the tiebreaking rally by singling off Hunter Strickland (1-2) to start the ninth. After Ian Desmond popped out, pinch-hitter Carlos Gonzalez walked and Tapia followed with a sharp single to right, scoring Reynolds.

Buster Posey connected for his ninth home run, a two-drive in the seventh off reliever Scott Oberg, but then left the game with ankle soreness.

ROYALS 7, ANGELS 2

ANAHEIM, Calif. — Lorenzo Cain and Alex Gordon hit solo home runs and Kansas City picked up its fifth consecutive victory.

Cain hit a line drive that barely cleared the wall in left center in the third inning, and Gordon followed it up with a shot to center in the fourth, his third of the year.

That was more than enough support for Matt Strahm (2-3), who won his first career start after making 41 appearances as a reliever over the past two seasons. Strahm went five innings, striking out three while giving up three hits and one walk.

Ricky Nolasco (2-8) dropped his sixth straight start, giving up five runs and 10 hits in six innings, while the Angels failed to pick up their first three-game winning streak since Mike Trout’s thumb injury.