NEW YORK — Jacoby Ellsbury overcame a first-inning deficit against R.A. Dickey with a two-run homer on the knuckleballer’s third pitch of the game, then added an RBI single to lead the New York Yankees over the Toronto Blue Jays 5-3 Monday.

In a matchup of teams fighting for playoff berths as the season passed Labor Day, Masahiro Tanaka (12-4) settled down after a shaky first to win his fifth straight decision.

New York (71-65) matched its season high of six games over .500 but remained on the periphery of contention, 3 1/2 games back for the AL’s second wild card. The AL East-leading Blue Jays (77-60) started the day one game ahead of Boston.

Dellin Betances, the Yankees’ sixth pitcher, got three straight outs for his ninth save.

Dickey (9-14) allowed five runs and seven hits in four innings on a blustery afternoon. He is 0-6 in his last nine starts at Yankee Stadium.

TIGERS 5, WHITE SOX 3, 11 INNINGS

CHICAGO — Justin Upton hit a three-run home run in the 11th inning to lift Detroit over Chicago for its 11th win in 14 games.

Miguel Cabrera homered twice and had four hits off Chris Sale, and Justin Verlander struck out 11 in seven innings as the Tigers stayed tied with Baltimore for the second AL wild card.

Chris Beck (1-1) issued consecutive two-out walks to Victor Martinez and J.D. Martinez before Upton crushed a 1-2 fastball to right for his 21st home run. It was his second game-winning homer in two days after connecting in the eighth inning Sunday against Kansas City.

Cabrera became the fourth player to reach 300 homers with the Tigers with a liner to right in the first.

Alex Wilson (2-0) gave up one hit in the 10th and Francisco Rodriguez gave up a run in the 11th before securing his 39th save.

ASTROS 6, INDIANS 2

CLEVELAND — Rookie Alex Bregman continued his hot hitting with a two-run homer in the third inning and Houston ended Cleveland’s six-game winning streak.

Bregman has hit all seven of his homers and driven in 22 runs over his last 19 games for the Astros, who remain two games out of the second wild-card spot in the AL.

Mike Fiers (10-6) allowed two runs in five innings and defeated the Indians for the second time this season.

The Indians took struggling right-hander Josh Tomlin out of the rotation last week, forcing them to go with eight pitchers Monday in what amounted to a bullpen game for the AL Central leaders.

Mike Clevinger (2-2) allowed a run in the first and was pulled after 1 2/3 innings.

MARINERS 14, RANGERS 6

SEATTLE — Robinson Cano homered during a five-run first inning and Seattle knocked out starter Cole Hamels early and pulled away with a six-run sixth inning.

Cano’s 32nd homer of the season is one off his career high set in 2012 while with the New York Yankees. The two-run shot also set the tone for Seattle’s largest offensive output since scoring 14 in a win over Toronto in late July. Franklin Gutierrez drove in four runs, including a solo home run in the second inning and finished a triple short of the cycle.

Hamels (14-5) was knocked around for the second time in a week by the Mariners and failed to make it through two innings for just the second time in his career.

Felix Hernandez (10-5) made it through 5 2/3 innings and gave up six runs before being lifted.

CARDINALS 12, PIRATES 6

PITTSBURGH — Adam Wainwright drove in three runs and survived five occasionally bumpy innings to pick up his first victory since mid-July.

Wainwright hit an RBI-double off Chad Kuhl (3-3) in the second and added a two-run single in the fourth as the Cardinals held on to the second wild card spot in the National League by sending the Pirates to their seventh straight loss.

Wainwright (10-8) allowed four runs and struck out five as his ERA rose to 4.61. He hardly needed to be sharp as the Cardinals battered Pittsburgh’s beleaguered pitching staff.

ORIOLES 7, RAYS 3

ST. PETERSBURG, Fla. — Ubaldo Jimenez threw a two-hitter for his first complete game since 2011, leading Baltimore to the win.

Jimenez (6-11) struck out six and walked one. He retired 25 of 26 — the lone baserunner coming on a fourth-inning walk — after giving up Logan Morrison’s three-run homer in the first.

Chris Davis homered and drove in three runs for the Orioles.

Rays slugger Evan Longoria left with soreness in his right hand. He was hit by a pitch in the first but remained in the game until being pulled after the fifth inning. The Rays said X-rays on Longoria’s hand were negative.

Matt Andriese (6-7) lost his seventh straight decision, allowing seven runs and nine hits in five innings.

METS 5, REDS 0

CINCINNATI — Bartolo Colon pitched six innings of five-hit ball and Matt Reynolds homered as the Mets won for the sixth time in eight games.

Kelly Johnson also went deep in New York’s 12th straight victory over Cincinnati.

Colon (13-7) improved to 4-1 with a 2.25 ERA in his last seven starts. The Reds put a runner on third with nobody out on two occasions, and Colon wiggled out of the jam each time.

Jay Bruce went 0 for 4 with two strikeouts in his first game in Cincinnati since the Reds traded him to the Mets on Aug. 1.

Robert Stephenson (2-1), one of Cincinnati’s top prospects, struck out nine in 5 1/3 innings. He allowed two runs and six hits, but fell short in his bid to become the first Cincinnati pitcher since Wayne Simpson in 1970 to win each of his first three major league starts.

DODGERS 10, DIAMONDBACKS 2

LOS ANGELES — Adrian Gonzalez and four others combined to homer five times off Zack Greinke in his first road start against his former team and Los Angeles beat Arizona for its third straight victory.

Kenta Maeda (14-8) allowed one run and three hits in 6 1/3 innings, struck out eight and walked one to tie Kazuhisa Ishii and Hyun-Jin Ryu for the second-most wins by a Los Angeles rookie, trailing only Rick Sutcliffe’s 17 in 1979. The Japanese right-hander has won six of his last seven.

The Dodgers increased their lead in the NL West to a season-high four games over San Francisco. They have won four of five.

Greinke (12-5) imploded in his return to Dodger Stadium for the first time since spurning the team as a free agent last December.

ROYALS 11, TWINS 5

MINNEAPOLIS — Brian Dozier hit three home runs for Minnesota, but the Royals used homers by Kendrys Morales and Eric Hosmer to get the road win.

Jarrod Dyson had three hits and scored three times for Kansas City, which won for the second time in six games and stayed on the edge of the AL wild-card race.

Dozier homered on the first pitch from Ian Kennedy (10-9), and then hit a two-run shot in the third and a solo drive into the upper deck in the eighth. Dozier became the sixth Minnesota player to hit three home runs in a game, and the first to do it at home.

Morales hit a three-run drive off Jose Berrios (2-5) in the fifth for a 5-4 lead. Hosmer, who had four RBIs, belted a three-run homer in the eighth.

ROCKIES 6, GIANTS 0

DENVER — Chad Bettis threw a two-hitter for his first career complete game, Carlos Gonzalez hit a grand slam and the Rockies beat the slumping Giants.

Bettis (12-7) was perfect until Eduardo Nunez singled with two outs in the fifth inning. The right-hander struck out seven and walked none.

San Francisco intentionally walked Nolan Arenado to face Gonzalez in the third. Gonzalez lined a fastball from Matt Moore (9-11) over the fence in right-center for his second grand slam of the season.

The Giants had the best record in baseball at the All-Star break. But they are a major league-worst 16-31 since then and are now trying to hang on to a wild-card spot.

CUBS 7, BREWERS 2

MILWAUKEE — Major league ERA leader Kyle Hendricks threw six strong innings and the Cubs pulled away for the victory.

Pinch hitter Chris Coghlan delivered a go-ahead single in a two-run seventh. He stayed in the game and got a two-run single in a four-run eighth for the NL Central leaders.

Hendricks (14-7) gave up one run — on Chris Carter’s 33rd homer — and five hits in six innings, and left with a 2.07 ERA. He is 5-0 with a 1.30 ERA over his last seven starts.

Ryan Braun hit his 25th homer in the ninth for Milwaukee. Zach Davies (10-7) was charged with three runs, two earned, and six hits in 6 2/3 innings.

NATIONALS 6, BRAVES 4

WASHINGTON — Trea Turner and Chris Heisey each homered during a five-run third inning, Max Scherzer pitched seven strong innings for his 16th victory and Washington beat Atlanta.

Scherzer (16-7) scattered seven hits and yielded two runs to win his fourth consecutive start. He has a 2.45 ERA in that span.

Ryan Weber (1-1) lost his first start of the season for Atlanta.

PADRES 2, RED SOX 1

SAN DIEGO — Edwin Jackson struck out 11 in seven scoreless innings to outpitch former Padres ace Drew Pomeranz, Adam Rosales hit a two-run homer and San Diego edged Boston.

Jackson (4-5) gave up four hits and ended his three-start losing streak.

Pomeranz (2-4 for Boston) was an All-Star for the Padres this season and 8-7 in the NL before being traded to the Red Sox in mid-July.

Brandon Maurer worked the ninth for his eighth save in 13 chances.

PHILLIES 6, MARLINS 2

MIAMI — Freddy Galvis hit a two-run homer and the Phillies snapped a six-game losing streak.

The Phillies’ run total was their highest since Aug. 14. They rank last in the majors in runs, and managed only 11 while going 0-6 during a homestand last week.

The Marlins lost their fourth game in a row and are 11-22 since Aug. 1. They fell two games below .500 for the first time since April 27 and could be headed for a seventh consecutive losing season.

Philadelphia’s Jerad Eickhoff (10-13) allowed the first two batters to score and then settled down to pitch six innings. The Phillies have won five of his past six starts.

Miami’s Jake Esch (0-1) allowed three runs in five innings in his second major league start.

ANGELS 10, ATHLETICS 7

OAKLAND, Calif. — Kole Calhoun hit a solo home run in the second inning, Albert Pujols had a two-run double in the fourth and Los Angeles held off Oakland.

Jose Valdez (1-1) earned his first major league win before former A’s closer Andrew Bailey finished for the Angels in a second straight game. It was just his second save since 2013.

Raul Alcantara (0-1) plunked three batters in the first inning alone and allowed five runs in four innings.