DETROIT -- Max Scherzer held the Los Angeles Dodgers to one run in seven innings, outdueling Zack Greinke in a matchup of All-Star pitchers and leading the Detroit Tigers to a 4-1 victory on Wednesday afternoon at Comerica Park.

Scherzer (11-3), who has held opponents to a combined five earned runs in his last four starts, allowed just four hits and struck out seven. Joe Nathan picked up his 18th save for the American League Central-leading Tigers. Greinke (11-5) gave up three runs and seven hits while striking out eight.

Austin Jackson had two extra-base hits and scored twice to lead Detroit's offense. Miguel Rojas hit his first major league home run for the Dodgers (51-42). Jackson's leadoff triple sparked a two-run first for the Tigers.

Angels 8, Blue Jays 7

ANAHEIM, Calif. -- Albert Pujols' two-run homer in the seventh inning lifted Anaheim over Toronto.

Pitching and defense were mostly absent during the game that lasted nearly four hours and included 22 hits and four errors.

Trailing 7-6 in the seventh, the Angels had Mike Trout on first base with one out when Pujols launched a pitch from Blue Jays left-hander Aaron Loup (2-2) deep to center field. Toronto center fielder Colby Lewis leaped and got his glove on the ball, but it caromed over the fence for what turned out to be the winner.

For Pujols, the home run was the 512th of his career, tying him with Ernie Banks and Eddie Mathews for 21st in major league history.

Red Sox 5, White Sox 4

BOSTON -- Boston, about to fall to 1-8 on its homestand, rallied late and pulled out the victory over Chicago when pinch hitter Daniel Nava doubled home the tying run and scored on Brock Holt's single in the ninth.

The defending champions scored three runs in the eighth inning before the walk-off rally, which made a winner of reliever Koji Uehara, who struck out the side in the top of the ninth.

Rookie outfielder Mookie Betts, who turned an infield hit into a double to fuel the eighth-inning rally, was hit by a pitch to start the ninth-inning uprising against Javy Guerra (0-1).

Royals 5, Rays 4

ST. PETERSBURG, Fla. -- Salvador Perez's three-run home run in the top of the ninth inning gave Kansas City a comeback win over Tampa Bay.

Perez, the American League's starting catcher in next week's All-Star Game, popped out with the bases loaded and the Royals trailing 4-2 in the seventh. Two innings later, he hit an arcing shot against reliever Kirby Yates (0-1) that just cleared the half wall down the left field line.

Kansas City got a leadoff single from Jarrod Dyson against right-hander Joel Peralta and a walk by Eric Hosmer with one out before Yates entered to face Perez. The catcher's 11th homer of the season punctuated a 2-for-5, three-RBI night.

Phillies 4, Brewers 1

MILWAUKEE -- Chase Utley and Jimmy Rollins homered, and Roberto Hernandez threw eight effective innings as Philadelphia beat Milwaukee.

Hernandez (4-8) lost his previous three decisions and six of his last seven, but he was sharp against Milwaukee. The right-hander allowed one run on three hits and two walks while striking out three. Closer Jonathan Papelbon worked a perfect ninth for his 22nd save of the season.

It was 1-1 in the sixth when Phillies catcher Cameron Rupp led off with a single. Two batters later, the Phillies took a 3-1 lead when Rollins took Kyle Lohse (9-4) to right for his ninth home run of the season.

Mets 4, Braves 1

NEW YORK -- Right-hander Dillon Gee threw seven impressive innings in his first start in almost two months, and catcher Travis d'Arnaud capped a three-run seventh inning with a long two-run homer as New York beat Atlanta.

The Mets have won four in a row, their first four-game winning streak since July 7-10 of last season. New York will go for the four-game sweep of the Braves -- which would be its first of Atlanta since 1989 -- on Thursday night.

Gee, who hadn't pitched since May 10 due to a right lat strain, improved to 4-1 after allowing one run on six hits and one walk while striking out four in a crisp 85-pitch effort.

Nationals 6, Orioles 2