SAN FRANCISCO -- Alex Reyes pitched seven dominant innings in his third major league start, fellow rookie Aledmys Diaz hit a two-run homer and the St. Louis Cardinals moved up in the tight NL wild-card race, blanking the San Francisco Giants 3-0 on Sunday.

The Giants dropped one game behind the New York Mets for the top wild-card spot. The Cardinals closed within one game of San Francisco.

Reyes (3-1), considered one of the majors' best pitching prospects, gave up four hits, struck out six and walked two.

Seung Hwan Oh pitched a scoreless ninth for his 18th save.

Diaz hit his 16th homer, a two-run drive in the third off Albert Suarez (3-4).

RED SOX 5, YANKEES 4

BOSTON -- Hanley Ramirez homered twice and drove in four runs to rally Boston, completing a four-game sweep that severely diminished New York's chances of winning the AL East.

Jackie Bradley Jr. had a tying RBI single for the East-leading Red Sox, who overcame a rough start by Drew Pomeranz to post their ninth win in 12 games. Boston remained three games ahead of second-place Baltimore, which beat Tampa Bay 2-1 on Sunday.

The Red Sox open a 10-game trip at Baltimore with the first of four games on Monday night.

Gary Sanchez belted his 16th homer since Aug. 3 for the Yankees, who dropped eight back in the division and remained four behind Toronto for the second wild-card spot.

Robby Scott (1-0) got two outs for his first major league win. Koji Uehara got three outs for his seventh save.

Tyler Clippard (1-1) allowed Ramirez's tiebreaking homer in the seventh.

METS 3, TWINS 2

NEW YORK -- Gabriel Ynoa struck out eight over 4 2/3 innings in his first major league start to aid the Mets' rickety rotation, and New York completed a three-game sweep.

New York took over the top spot in the NL wild-card race, winning for the 11th time in 14 games.

Michael Conforto drove in two runs with a first-inning single off Kyle Gibson (6-10) and T.J. Rivera added a solo home run in the third. Lucas Duda went 0 for 2 in his return from a stress fracture in his lower back, an injury that had sidelined him since May 20.

Erik Goeddel (2-1) won in relief. Jerry Blevins got his fourth career save, his second this year.

TIGERS 9, INDIANS 5

CLEVELAND -- Ian Kinsler got his helmet knocked off by a pitch from Trevor Bauer, yelled at the Cleveland right-hander and later was ejected in Detroit's win.

The Tigers defeated the AL Central leaders for only the second time in 15 tries this season. Miguel Cabrera added his 2,500th career hit as Dr

Bauer (11-8) hit three batters, including Kinsler in the third.

Kinsler grabbed the side of his head, was examined and went to first. Kinsler shouted at Bauer when he scored.

Daniel Norris (3-2) won and Francisco Rodriguez recorded four outs for his 43rd save.

ORIOLES 2, RAYS 1

BALTIMORE -- Mark Trumbo hit his major league-leading 43rd home run to break an eighth-inning tie and carry Baltimore.

Manny Machado also homered for the Orioles, who lead Toronto by one game for the top AL wild-card spot.

Trumbo homered off Ryan Garton (1-1).

Brad Brach (10-3) pitched the eighth and Zach Britton got three outs for his 45th save in 45 tries.

ANGELS 4, BLUE JAYS 0

ANAHEIM, Calif. -- Mike Trout and Albert Pujols each scored twice, Alex Meyer gave up two hits in five innings for his first career win and Los Angeles beat Toronto.

The Blue Jays fell out of a tie with Baltimore for the top AL wild-card spot.

Meyer (1-3) struck out a career-best seven and walked three. Marcus Stroman (9-9) went six innings.

The game was delayed for 13 minutes in the bottom of the third inning because of bees on the field.

MARINERS 7, ASTROS 3

SEATTLE -- Seth Smith hit two home runs and Seattle moved up in the AL wild-card race.

Smith drove in four runs to back Ariel Miranda (5-1).

The Mariners are one game behind Toronto for the second wild-card spot.

Doug Fister (12-12) took the loss.

DIAMONDBACKS 10, DODGERS 9, 12 INNINGS

PHOENIX -- Brandon Drury singled with two outs in the 12th inning to score Paul Goldschmidt, lifting Arizona over the NL West leaders.

Drury had four hits, including a home run, and got his chance in the 12th after the Dodgers intentionally walked Jake Lamb. Ross Stripling (4-8) got the loss.

Matt Koch (1-0) got the win.

ATHLETICS 5, RANGERS 2

ARLINGTON, Texas -- Khris Davis homered twice, giving him 40 this season for Oakland.

Davis is the first A's player to hit 40 homers since Jason Giambi had 43 in 2000. Davis has 10 homers in 15 games against the Rangers.

Ross Detwiler (2-3) went 5 1/3 innings and limited AL West-leading Texas to two runs. Ryan Dull got his third save.

Colby Lewis (6-3) allowed three runs in 5 1/3 innings in his second start since a two-month stay on the disabled list because of a strained right lat.

ROYALS 10, WHITE SOX 3

KANSAS CITY, Mo. -- Kendrys Morales homered for his 1,000th career hit and drove in four runs while Danny Duffy pitched effectively into the eighth inning for Kansas City.

Duffy (12-2) struck out eight.

Todd Frazier hit his 37th homer, a White Sox record for a third baseman.

Jose Quintana (12-11) fell to 1-9 lifetime against the Royals.

BRAVES 6, NATIONALS 2

ATLANTA -- Adonis Garcia drove in three runs, Matt Wisler pitched five-plus innings and Atlanta beat the NL East leaders in a rain-shortened game.

The game ended in the bottom of the seventh after a second delay that lasted 1 hour, 50 minutes.

Wisler (7-12) allowed two runs.

Joe Ross (7-5), reinstated from the disabled list after missing 66 games with right shoulder inflammation, allowed one run and six hits in three innings.

BREWERS 3, CUBS 1

CHICAGO -- Major league ERA leader Kyle Hendricks allowed two runs in six innings for the NL Central champion Chicago in a loss to Milwaukee.

Hendricks (15-8), making his first start since losing a no-hit bid in the ninth inning at St. Louis, struck out nine. His ERA rose from 2.03 to 2.06.

Tyler Thornburg struck out Kris Bryant and Anthony Rizzo with two on in the ninth to earn his 11th save in 16 chances.

Wily Peralta (7-10) had an RBI single.

REDS 7, PIRATES 4

CINCINNATI -- Joey Votto hit his 25th homer, Tucker Barnhart tied his career high with four RBIs and Cincinnati ended Pittsburgh's four-game winning streak.

Votto finished with four hits as the Reds stopped their four-game skid.

Dan Straily (13-8) got the win.

Ivan Nova (12-7) had been 5-0 since being traded from the Yankees to Pittsburgh on Aug. 1.

MARLINS 5, PHILLIES 4

PHILADELPHIA -- J.T. Realmuto delivered a go-ahead infield single in the eighth inning and Miami rallied to avoid a sweep.

Reliever Mike Dunn (4-1) won in relief and A.J. Ramos pitched a scoreless ninth for his 37th save.

With the Marlins trailing 4-2 in the eighth, Christian Yelich hit a two-run homer off Hector Neris (4-4).

ROCKIES 6, PADRES 3

DENVER -- Mark Reynolds homered in the fourth inning and Chad Bettis pitched into the sixth for Colorado.

San Diego played a day after Yangervis Solarte lost his wife, Yuliett, following a battle with cancer. The third baseman was with his family Sunday -- before the game the Rockies held a moment of silence for her.

Adam Rosales paid tribute to his teammate with a jump and a clap at home plate after his homer in the second inning, mimicking Solarte's home run celebration.

Bettis (13-7) helped himself with two walks and an RBI. Adam Ottavino got his fifth save.

Jarred Cosart (0-4) took the loss.