BOSTON - Chris Sale matched a career worst by giving up four home runs in a playoff tuneup, including a pair to Josh Donaldson, and the Boston Red Sox lost 9-4 to the Toronto Blue Jays on Tuesday night.

Teoscar Hernandez hit one of his two homers off Sale, and Kendrys Morales had the other against Boston's ace lefty. Sale (17-8) allowed five runs in five innings and surrendered multiple homers for the third time in five starts. Sale last allowed four homers in a game Aug. 23, 2013 against Texas.

Boston's magic number over the Yankees in the AL East is three with five games remaining. New York beat Tampa Bay 6-1.

The Red Sox dropped their second straight, their first skid since losing three in a row from Sept. 2-4. Houston won later Tuesday, ensuring the AL East winner will open the playoffs on the road.

Sale did have eight strikeouts, giving him 308 for the season. The AL Cy Young Award candidate has a 2.90 ERA for the season with one scheduled start remaining.

J.A. Happ (10-11) pitched seven strong innings for the last-place Blue Jays, holding Boston to a run on four hits with nine strikeouts.

Donaldson homered in the first inning for the second straight game, then led off the third with his 33rd this season. The latter shot cleared the bullpen and reached the right-field seats to put Toronto ahead 2-1. Hernandez led off the fifth with a homer to left, and Morales added a two-run shot later that inning.

Boston was missing three injured starters in Dustin Pedroia, Mookie Betts and Eduardo Nunez, and it struggled against Happ. Xander Bogaerts led off the game with a single and scored on Chris Young's double, but Happ got the next 16 batters in a row and kept the Red Sox off the bases until Bogaerts' one-out single in the sixth.

Toronto added four runs in the eighth, two of them on Hernandez's two-run shot to left that nearly cleared the Green Monster, and the Blue Jays led 9-1.

Sandy Leon led off the eighth with a homer, and Young hit an RBI triple for Boston in a three-run eighth.

TWINS 8, CLEVELAND 6

CLEVELAND - Brian Dozier's three-run homer in the eighth inning pushed Minnesota to the brink of a playoff berth as the Twins rallied for an 8-6 victory over Cleveland on Tuesday night. The Indians lost for just the third time in 32 games.

Dozier connected for his 33rd homer against Bryan Shaw (4-6) as the Twins lowered their magic number for clinching a playoff berth to one.

Edwin Encarnacion hit his 38th homer and drove in four runs for the Indians, whose 29-3 mark over 32 games is the best in the majors since the 1947 New York Yankees accomplished the feat.

Taylor Rogers (7-3), one of a club-record 10 pitchers used by Twins manager Paul Molitor, got two outs in the seventh and Matt Belisle worked the ninth for his eighth save.

YANKEES 6, RAYS 1

NEW YORK - Aaron Hicks robbed Wilson Ramos of a first-inning grand slam in the outfielder's return from the disabled list, and the Yankees clinched home-field advantage if they end up in the AL wild-card game next week.

Tampa Bay's first three batters reached against rookie Jordan Montgomery (9-7), and Hicks leaped at the 385-foot sign in right-centre to get his glove above the wall. He squeezed the webbing tight, preventing the ball from popping out and limiting Ramos to a sacrifice fly.

Assured no worse than a wild-card berth, the Yankees closed within three games of AL East-leading Boston with five remaining.

Tampa Bay (76-81) was eliminated from playoff contention and missed the post-season for the fourth straight year. Blake Snell (4-7) got the loss.

DODGERS 9, PADRES 2

LOS ANGELES - Adrian Gonzalez hit his third home run of an injury-plagued season and Los Angeles beat San Diego to clinch home-field advantage throughout the National League playoffs.

Yasmani Grandal and Corey Seager each had a three-run homer for the NL West champions, who improved to 101-57.

They'll open a best-of-five Division Series at home Oct. 6 against the winner of the NL wild-card game, hosted by Arizona. The Diamondbacks' opponent has not been determined yet.

Alex Wood (16-3) allowed two runs in six innings for Los Angeles. Dinelson Lamet (7-8) gave up four runs and walked six over five innings.

ROCKIES 6, MARLINS 0

DENVER - Trevor Story hit a three-run homer and Tyler Anderson pitched seven superb innings, helping Colorado maintain its slim lead for the second NL wild card.

The Rockies notched their first win over the Marlins in five tries this season and stayed 1 1/2 games ahead of Milwaukee.

Nolan Arenado hit a two-run homer in the fifth for Colorado. Anderson (6-6) allowed four hits and walked none.

Miami starter Jose Urena (14-7) yielded six runs over five innings. The right-hander allowed a total of six runs in four previous starts this month.

ANGELS 9, WHITE SOX 3

CHICAGO - Mike Trout hit his 31st homer, Albert Pujols joined Alex Rodriguez as the only players with 100 RBIs in 14 seasons, and the fading Angels won on the road.

Los Angeles remained five games behind Minnesota for the final AL wild card with five to play.

Trout, Brandon Phillips and Luis Valbuena homered off Chris Volstad (1-1) during a six-run second inning. Parker Bridwell (9-3) improved to 5-0 in nine road starts.

Jose Abreu had three hits for Chicago, including his 32nd and 33rd homers.

PIRATES 10, ORIOLES 1

PITTSBURGH - Andrew McCutchen hit his first career grand slam and drove in eight runs, powering Pittsburgh to the victory.

McCutchen raised a fist in triumph as he rounded the bases after connecting against Kevin Gausman (11-11) in the second inning. He also hit an RBI double in the first, singled in the fifth and belted a three-run homer in the seventh.

McCutchen's eight RBIs were one off the franchise record and the most by a Pirate since Jason Bay in 2004.

Trevor Williams (7-9) pitched six innings of one-run ball and rookie Steven Brault finished the five-hitter for his first career save.

ASTROS 14, RANGERS 3

ARLINGTON, Texas - Carlos Correa, Brian McCann and Cameron Maybin each drove in three runs, and Houston clinched no worse than the second-best record in the American League.

Houston (97-60) trails Cleveland by one game with five to play in the race for the league's best record. The Indians own the tiebreaker, having won the season series.

Astros left-hander Dallas Keuchel (14-5) struck out eight while pitching six effective innings.

Rangers ace Cole Hamels (11-5) was charged with six runs in three-plus innings.

CARDINALS 8, CUBS 7

ST. LOUIS - Tommy Pham and Randal Grichuk homered, and the Cardinals denied the Cubs a chance at clinching the NL Central title.

Matt Carpenter and Jedd Gyorko also connected for St. Louis, which is 2 1/2 games back in the race for the second NL wild card. Zach Duke (1-1) got the win and Juan Nicasio earned his fifth save.

Jason Heyward hit a three-run homer for Chicago, and Ben Zobrist also went deep. Jake Arrieta (14-10) was charged with three earned runs in three innings.

The Cubs (88-69) still lead the division by five games over second-place Milwaukee.

BREWERS 7, REDS 6

MILWAUKEE - Domingo Santana hit a three-run homer in Milwaukee's four-run first, and the Brewers held on for the win.

Milwaukee remained 1 1/2 games behind Colorado for the second NL wild card. Josh Hader (2-3) earned the win, and Corey Knebel worked the ninth for his 38th save.

Scott Schebler, Zack Cozart and Jesse Winker homered for last-place Cincinnati, which has dropped seven in a row. Rookie Deck McGuire (0-1) allowed four earned runs in three innings.

DIAMONDBACKS 11, GIANTS 4

PHOENIX - J.D. Martinez hit a grand slam and drove in six runs, leading Arizona and its lineup of regulars over San Francisco.

Martinez continued his torrid September in which he has 15 home runs, 35 RBIs and seven doubles with a .414 batting average. He has 28 homers since the Diamondbacks acquired him from Detroit, tied with Miami slugger Giancarlo Stanton for most in the majors since July 19.

The six RBIs tied a career high, and Martinez's total of 103 RBIs on the season is a career best.

Arizona starter Robbie Ray (15-5) had more than enough support, though he gave up Tim Federowicz's two-run homer in the fifth.

Giants starter Matt Moore (6-15) couldn't make it out of the second inning.

PHILLIES 4, NATIONALS 1

PHILADELPHIA - Jake Thompson pitched four-hit ball into the sixth inning, and Philadelphia spoiled Bryce Harper's return from a knee injury.

With the loss, Washington locked itself into the second seed in the NL playoffs behind the Dodgers. The Nationals will host the NL Central champion in a Division Series beginning Oct. 6 at Nationals Park.

Thompson (3-2) was charged with a run in five-plus innings. Hector Neris struck out the side in the ninth for his 25th save.

Harper played for the first time since hyperextending and bruising his left knee on Aug. 12. He was 0 for 2 with a walk before being lifted in the fifth inning.

Washington left-hander Gio Gonzalez (15-8) allowed three runs in five innings.

MARINERS 6, ATHLETICS 3

OAKLAND, Calif. - Danny Valencia hit a three-run homer against his former team and fellow ex-Oakland slugger Yonder Alonso added a two-run shot for Oakland.

Khris Davis matched his career high from last season with his 42nd homer, a two-run shot in the sixth to put Oakland ahead before Valencia's 15th of the year in the seventh off Daniel Mengden (2-2).

Emilio Pagan (2-3) pitched 1 2/3 innings in relief of James Paxton for the win, then Edwin Diaz closed it out for his 33rd save.

METS 4, BRAVES 3

NEW YORK - Travis Taijeron hit a game-ending RBI single in the ninth, sending the Mets to the win.

New York was stymied by R.A. Dickey much of the night and trailed 3-0 in the seventh before Kevin Plawecki hit a two-run homer off the 42-year-old knuckleballer. Asdrubal Cabrera tied it with a sacrifice fly in the eighth.

Jeurys Familia (2-2) pitched a scoreless inning for the win.

Dickey, who won the NL Cy Young Award with the Mets in 2012, allowed five hits in 6 2/3 innings. A.J. Minter (0-1) got the loss.

ROYALS 2, TIGERS 1

KANSAS CITY, Mo. - Jason Vargas moved into a tie for the major league lead with his 18th victory, leading the Royals over the struggling Tigers.

Vargas (18-10) went six innings to match Cleveland's Corey Kluber and the Dodgers' Clayton Kershaw for most wins in the majors. He gave up a run and five hits.

The Tigers have dropped eight straight to fall to 4-21 in September. Anibal Sanchez (3-6) took the loss, allowing two runs and seven hits in six innings.

Mike Minor worked the ninth for his third save in five chances.