WASHINGTON (AP) — Max Scherzer lost his bid for a perfect game in startling fashion, plunking a batter with two outs in the ninth inning before finishing off a no-hitter Saturday in the Washington Nationals' 6-0 win over the Pittsburgh Pirates.

Scherzer came within one strike of throwing the 22nd perfect game in major league history since 1900. Pinch-hitter Jose Tabata fouled off three 2-2 deliveries, then seemed to slightly drop his elbow and got clipped by Scherzer's slider.

Scherzer immediately grimaced as the ball ricocheted to the ground. The crowd at Nationals Park seemed stunned, too, and surely many wondered whether Tabata had leaned into the 86 mph pitch to get hit. Scherzer (8-5) then retired Josh Harrison on a deep fly to left and was swallowed up by jubilant teammates near the mound. The 30-year-old righty struck out 10.

Francisco Liriano (4-6) took the loss.

YANKEES 14, TIGERS 3

NEW YORK (AP) — Alex Rodriguez added to his momentous weekend with a homer and five RBIs, Carlos Beltran went deep from both sides of the plate and the New York Yankees routed the Detroit Tigers.

Light-hitting Didi Gregorius homered for the second consecutive night and New York banged out a season-best 18 hits on Old-Timers' Day at Yankee Stadium.

Brett Gardner tripled, doubled and singled his first three times up against Alfredo Simon (7-4), sparking the Yankees to a laugher from his leadoff spot. Chris Young homered off backup infielder Josh Wilson in the eighth and finished with three hits.

All the offense made things easy on Nathan Eovaldi (6-2), who took a two-hit shutout into the seventh. Bryan Mitchell worked three innings for his first major league save.

ORIOLES 5, BLUE JAYS 3

TORONTO (AP) — Caleb Joseph singled home the go-ahead run with two outs in the ninth inning and the Baltimore Orioles beat the Blue Jays, ending Toronto's home winning streak at nine games.

With the score 2-all, J.J. Hardy reached on a force play and Ryan Flaherty was hit by a pitch from Aaron Loup (2-4) in the ninth. Joseph snapped an 0-for-9 slump with his single. Ryan Tepera relieved and surrendered a two-run double to Manny Machado.

Darren O'Day (3-0) worked one inning for the win. Zach Britton gave up Jose Bautista's RBI single in the bottom of the ninth but held on for his 19th save.

Toronto fell short of matching the longest home winning streak in club history. The Blue Jays won 10 straight at Exhibition Stadium in 1985.

WHITE SOX 3, RANGERS 2

CHICAGO (AP) — Carlos Rodon pitched six effective innings and the Chicago White Sox snapped a season-worst eight-game losing streak, beating the Texas Rangers.

The White Sox scored more than two runs for the first time in seven games. Adam Eaton had two singles and scored a run. Rodon (3-1) gave up two runs and four hits, striking out five and walking three. Chicago avoided losing nine consecutive games for the first time since 2013.

David Robertson pitched the ninth for his 14th save in 18 chances. On Friday night, he allowed two runs in the ninth of a 2-1 loss to the Rangers.

Nick Martinez (5-3) gave up two earned runs in six innings for Texas.

CUBS 4, TWINS 1, 10 innings

MINNEAPOLIS (AP) — Starlin Castro atoned for a costly error the previous night with a two-run single in the 10th inning, helping the Chicago Cubs to a victory over the Minnesota Twins.

Castro's error at shortstop in the first inning Friday night got the Twins rolling to a 7-2 victory. But he ripped a one-out pitch from Blaine Boyer (2-3) into center field to break a 1-1 tie and help the Cubs improve to 7-3 in extra-inning games this season.

Jon Lester allowed one run in 6 1/3 innings for the Cubs, and Anthony Rizzo had two hits and an RBI. Jason Motte (4-1) pitched a scoreless inning for the win and Hector Rondon picked up his 12th save in 15 chances.

Trevor May gave up one run in six innings for Minnesota, which had won three in a row. Kurt Suzuki connected for this third homer.

ATHLETICS 4, ANGELS 1

OAKLAND, Calif. (AP) — Jesse Hahn pitched into the eighth inning for his third consecutive win, Josh Reddick hit a tiebreaking double in the sixth and the Oakland Athletics beat the Los Angeles Angels despite committing their majors-leading 70th error.

One day after blowing a five-run lead with ace Sonny Gray on the mound in a 12-7 loss, the A's pounded out five doubles — three in the three-run sixth.

Hahn (5-5) allowed one run and four hits in 7 2/3 innings. Rookie Billy Burns had two infield hits to raise his AL-leading mark to 21 for Oakland, which won for only the second time in the last seven games between the teams. Tyler Clippard retired four batters for his 11th save.

Jered Weaver (4-8) allowed four runs and six hits with four strikeouts and one walk. The right-hander has lost his last four starts.

ROCKIES 5, BREWERS 1

DENVER (AP) — Charlie Blackmon homered and drove in three runs, Chad Bettis pitched effectively into the seventh inning and the Colorado Rockies snapped a five-game losing streak.

Adam Lind homered for the Milwaukee Brewers' only run.

Colorado had lost nine of its last 10 before getting a strong outing from Bettis (3-2), who got his first win since carrying a no-hitter into the eighth inning at Philadelphia on May 29. He allowed one run and five hits, walked two and struck out five in 6 1/3 innings.

Milwaukee starter Kyle Lohse (3-9) had his best outing in a month, but is 0-5 with a 7.59 ERA in his last seven starts.

CARDINALS 10, PHILLIES 1

PHILADELPHIA (AP) — Randal Grichuk hit two home runs, doubled and drove in four runs, and John Lackey pitched seven strong innings to lead the St. Louis Cardinals over the Philadelphia Phillies.

Lackey (6-4) allowed one run on five hits to earn his first victory on the road this season away from Busch Stadium. Jason Heyward had three hits with a double and two RBIs, Jhonny Peralta had three singles with an RBI, and Yadier Molina singled, doubled and drove in a run for the Cardinals, who won their seventh in nine games while beating Philadelphia for the fifth straight time.

Cody Asche homered for the Phillies, who have lost 11 of 12. Aaron Harang (4-9) lost his sixth straight start for the first time in his career.

MARLINS 5, REDS 0

CINCINNATI (AP) — Left-hander Justin Nicolino pitched seven innings to win his major league debut and Derek Dietrich hit two home runs as the Miami Marlins snapped a three-game losing streak.

The efficient Nicolino allowed four hits with two walks and two strikeouts while outpitching Anthony DeSclafani (5-5), his former roommate in the Toronto and Miami organizations. Nicolino was recalled from Triple-A New Orleans to start in place of right-hander Tom Koehler, who was scratched with back and neck soreness.

BRAVES 6, METS 4

ATLANTA (AP) — Andrelton Simmons got four hits for the Atlanta Braves in a win over the New York Mets, who lost their fourth in a row and catcher Travis d'Arnaud to an elbow injury.

A.J. Pierzynski tripled, doubled and singled. He scored standing up on Pedro Ciriaco's tiebreaking sacrifice fly in the sixth inning, and his left leg appeared to hit d'Arnaud's left arm.

The Mets said d'Arnaud is day to day with a hyperextended left elbow.

Williams Perez (4-0) allowed four runs on five hits in six innings, and Jason Grilli earned his 20th save. Jack Leathersich (0-1) lost in relief.

ROYALS 7, RED SOX 4

KANSAS CITY, Mo. (AP) — Kendrys Morales homered on his 32nd birthday and the Kansas City Royals rallied to beat the Boston Red Sox.

Morales hit a two-run, tie-breaking shot in a five-run fifth off Rick Porcello (4-8). It was his third career homer on his birthday.

The Red Sox lost third baseman Pablo Sandoval (sprained left ankle) and catcher Blake Swihart (sprained left foot) to injuries, and designated hitter David Ortiz was ejected in the seventh inning by home plate umpire Bruce Dreckman.

Salvador Perez hit his fifth home run in 12 games for the Royals. Edinson Volquez (7-4) was not sharp, allowing four runs, eight hits and two walks in 5 1/3 innings, but won his third straight start. Greg Holland worked the ninth for his 13th save.

RAYS 4, INDIANS 1

CLEVELAND (AP) — Evan Longoria hit a three-run homer in the first inning and the Tampa Bay Rays handed reigning Cy Young winner Corey Kluber his fourth straight loss.

Longoria, who has been playing with a sore left wrist, hit his first home run since June 10. The Rays have won four straight and eight of nine to climb to a season-high 10 games over .500 (40-30).

Rays starter Erasmo Ramirez left in the fourth inning with a groin injury. Five relievers completed the victory, holding Cleveland to six hits. Xavier Cedeno (1-0) replaced Ramirez and completed the fourth. Brad Boxberger earned his 18th save.

Kluber (3-9) allowed four runs and four hits in seven innings.

GIANTS 6, DODGERS 2

LOS ANGELES (AP) — Justin Maxwell and Brandon Belt hit two-run homers and the San Francisco Giants trimmed the Dodgers' NL West lead to a half-game with a win over Los Angeles.

Tim Hudson (5-6) pitched six-hit ball into the seventh inning and got a key single for the Giants, who have won five straight over their archrivals and nine of 11 this season. Los Angeles (38-31) has been alone in first place since May 30, but San Francisco (38-32) could reclaim the top spot with a series sweep Sunday.

Joc Pederson and Justin Turner hit back-to-back homers in the first for the Dodgers, who have lost six of eight. Maxwell and Belt connected against Carlos Frias (4-5), who gave up six runs and five hits in 5 1/3 innings.

MARINERS 6, ASTROS 3

SEATTLE (AP) — Taijuan Walker struck out a career-high 11 while pitching into the seventh inning to lead the Seattle Mariners past the Houston Astros.

Nelson Cruz, Seth Smith and Mark Trumbo homered for the Mariners, who have won two in a row and scored at least five runs in back-to-back games for the first time since April 19-20.

Walker (5-6) allowed three runs and five hits, and walked none in 6 1/3 innings.

Evan Gattis and Luis Valbuena homered for the Astros. Houston starter Dallas Keuchel (8-3) extended his streak of pitching at least six innings to 26 straight starts — the longest active run in the majors — but had his worst performance of the year. Keuchel's four walks, five earned runs, and three home runs allowed were all season highs.

PADRES 8, DIAMONDBACKS 1

PHOENIX (AP) — Tyson Ross threw a four-hitter in his third career complete game and the San Diego Padres beat the Arizona Diamondbacks.

Clint Barmes went 3-for-4 with two doubles, driving in two runs and scoring twice.

Derek Norris and Melvin Upton Jr. homered for the Padres. Upton's was his first of the season, a two-run shot off Addison Reed in the Padres' four-run ninth inning.

Ross (4-7) matched his season high with nine strikeouts and walked one. Robbie Ray (2-2) allowed four runs and six hits in 5 2/3 innings for Arizona.