NEW YORK — Mark Teixeira hit a grand slam with two outs in the ninth inning, and the New York Yankees staved off playoff elimination at the last possible moment with a 5-3 victory over the Boston Red Sox on Wednesday night.

Boston clinched the AL East title nearly 30 minutes before Teixeira connected, thanks to Toronto’s 3-2 loss against Baltimore. But a five-run comeback by New York in the ninth prevented its longtime rival from celebrating on the Yankee Stadium field.

The Orioles’ victory put the Yankees on the brink of wild-card elimination following a surprising charge late this season. New York had only one infield hit and trailed 3-0 heading into the ninth, faced with the prospect of facing Red Sox closer Craig Kimbrel.

Kimbrel, however, gave up a leadoff single to Brett Gardner and three straight walks, the last forcing in a run. Red Sox manager John Farrell lifted Kimbrel (2-5) for Joe Kelly, who struck out Starlin Castro and retired Didi Gregorius on a foul popup. With the Yankees down to their last out, Teixeira, planning to retire after this season, launched a 99 mph fastball on an 0-1 count to right-center.

James Pazos (1-0) was the winner.


TORONTO — Hyun Soo Kim hit a pinch-hit, two-run homer in the ninth inning off Roberto Osuna, and Baltimore beat Toronto to move within one game of the AL wild-card-leading Blue Jays.

With Toronto ahead 2-1, Jonathan Schoop singled with one out, pinch-runner Michael Bourn stole second and Kim homered on a 3-2 pitch into the visiting bullpen in right.

Osuna (3-3) has five blown save chances, including two in his last three appearances.

Baltimore’s Mark Trumbo hit his major league-leading 46th home run, a solo drive off Jason Grilli in the eighth. Brian Duensing (1-0) got one out, and Zach Britton finished for his 47th save.


DETROIT — Miguel Cabrera hit a tiebreaking three-run homer in the fifth inning, moments before the game was halted for good, and Detroit came away with a rain-shortened victory over Cleveland to keep pace with Baltimore in the AL wild-card race.

Detroit trails the Orioles by one game for the AL’s second wild card, and the Tigers certainly caught a break in this one. The rain was a factor throughout the evening — there was also a delay during the third inning — and it was certainly coming down when Detroit began its rally in the fifth.

With two on and one out, Cabrera hit a line drive over the wall in right off Joseph Colon (1-3) for his 36th homer. Blaine Hardy (1-0) won in relief of Michael Fulmer.


SAN FRANCISCO — Jeff Samardzija gave San Francisco a chance to grab momentum after a big offensive outburst a night earlier, but the playoff-hopeful Giants wasted it with a costly dud.

Rockies right-hander Tyler Chatwood (12-9) struck out nine in eight innings and outdueled Samardzija (12-11), shutting down San Francisco a day after the Giants pounded 19 hits in a 12-3 win.

San Francisco dropped to 1 1/2 games behind the Mets for the top wild card and remained a game up on St. Louis for the second spot after the Cardinals lost to Cincinnati.

Adam Ottavino got his sixth save.


PITTSBURGH — John Jaso hit for the cycle and drove in five runs in Pittsburgh’s victory over Chicago.

Jaso tripled off reliever Pedro Strop in the seventh inning for the first cycle in the history of PNC Park and the first for the Pirates since 2004. Jaso’s final hit was a fly ball to center field. He hesitated rounding second base, but went on and the throw from Albert Almora Jr. was up the baseline.

Jaso accomplished the feat in just four at-bats. The last Pirate to hit for the cycle was Daryle Ward on May 26, 2004, in St. Louis. The last Pirates’ home cycle was by Jason Kendall on May 19, 2000, against the Cardinals at Three Rivers Stadium.

Against Chicago starter Jake Arrieta (18-8), Jaso singled in the second inning, hit a three-run home run in the fourth and doubled in the fifth. Arrieta went five innings and allowed 10 hits and seven runs, both season highs.

Pirates starter Jameson Taillon (5-4) allowed one hit and struck out four in six innings.

Chicago’s Anthony Rizzo hit a solo homer, his 32nd of the season.


ARLINGTON, Texas — Carlos Gomez hit a three-run homer in the eighth inning and AL-leading Texas beat Milwaukee for its major league-best 49th come-from-behind victory.

Texas (94-65) moved closer to home-field advantage with a 1 1/2-game lead over Boston for the best record in the American League.

Jonathan Lucroy, the catcher traded from Milwaukee to Texas on Aug. 1, reached to start the eighth on a two-base error when the ball ricocheted off the glove of center fielder Hernan Perez. Delino DeShields came on as a pinch-runner, and after Mitch Moreland walked, he scored the tying run when Elvis Andrus greeted reliever Tyler Thornburg with a single to center.

Gomez then hit a 418-foot homer to left, his 13th this season. It was the eighth in 31 games for the Brewers’ former two-time All-Star since joining the Rangers last month after being released by Houston. He had a three-run homer on Tuesday night, that one traveling 444 feet.

Rougned Odor hit a two-run homer in the first for the Rangers, his 32nd.

Jeremy Jeffress (1-0) worked the final two innings, winning for AL West champion Texas five days after being reinstated by Major League Baseball from the restricted list following a drunken driving arrest last month and then a three-week stint in an inpatient rehab clinic.

Corey Knebel (1-4) was the loser.


KANSAS CITY, Mo. — Kendrys Morales and Alex Gordon keyed an eighth-inning rally and Kansas City beat Minnesota, but the Royals were still knocked out of playoff contention.

The defending World Series champs were eliminated when Baltimore beat Toronto.

Morales’ ground-rule double to right scored Jarrod Dyson, who had doubled and stole third. Gordon’s single scored Whit Merrifield and pinch-runner Billy Burns.

Taylor Rogers (3-1), the fourth of five Twins pitchers, took the loss after allowing three runs, three hits and two walks while retiring only one of the six batters he faced.

Joakim Soria (5-8) worked a scoreless eighth to pick up the victory. Wade Davis got his 27th save.


MIAMI — The Marlins walked half a block alongside a hearse carrying their ace away from Marlins Park at the start of a funeral motorcade, then peeled away with watery eyes to go back inside and play.

Drained by four days of grieving Jose Fernandez’s death in a boating accident, Miami didn’t have much left for the New York Mets. Jay Bruce hit his 32nd home run, James Loney also homered and New York helped their NL wild-card chances by beating Miami.

The Marlins’ loss in their home finale eliminated them from playoff contention. Despite high hopes this year, they still haven’t been to the postseason since 2003.

Set Lugo (5-2) went 5 1/3 innings and allowed two runs.

Jose Urena (4-9) allowed five runs in five innings.


HOUSTON — Robinson Cano hit a three-run homer in the first inning, and Seattle beat Houston to keep pressure on the other AL wild-card contenders.

Cano’s career-best 36th home run, a drive off Doug Fister (12-13), landed in the first row of the Crawford Boxes in left field. Cano has nine homers and 25 RBIs in 19 games against Houston this season.

Kyle Seager added another three-run drive in the eighth, his 30th home run this season.

James Paxton (6-7) allowed three runs and six hits in five innings, striking out eight.

Fister gave up five runs and five hits over 1 1/3 innings in the shortest start of his big league career. George Springer and Evan Gattis homered for Houston.


SAN DIEGO — Rookie Hunter Renfroe hit the first home run in Petco Park history to land on the roof of the brick warehouse in the left-field corner and drove in four runs to lead San Diego.

With one out in the third, Renfroe drove a two-run homer off Jose De Leon onto the top of the Western Metal Supply Co. building, a remnant from the skid row neighborhood that made way for Petco Park, which opened in 2004. It went an estimated 435 feet.

The Dodgers lost despite hitting three home runs off rookie Luis Perdomo (9-10). Ross Stripling (5-9) allowed a run in three innings.


ST. LOUIS — Adam Duvall’s two-run single was all Cincinnati needed to beat St. Louis.

The Reds’ third win in their last four games dealt a blow to the Cardinals’ playoff hopes. St. Louis lost ground in the race for the two NL wild cards.

Reds starter Anthony DeSclafani (9-5) allowed one runner in each of the first four innings, but only once during that span did the Cardinals have anyone in scoring position. He stranded five runners, including two in the sixth, his last inning. He allowed six hits and one run.

It was the fifth quality start out of six in DeSclafani’s career against the Cardinals. He improved to 4-1 with a 2.13 ERA against St. Louis.

Duvall drove in his 101st and 102nd RBIs with his third-inning single. He has seven RBI in the series.

Raisel Iglesias earned his fifth save in six opportunities with two innings of relief.


WASHINGTON — Shelby Miller threw five shutout innings, Jean Segura had three hits to reach 200 for the season and Arizona beat Washington Nationals a rain-shortened game.

The start of the game was delayed 33 minutes by rain and was called with one out in the top of the sixth inning after waiting out a second delay of 70 minutes.

The NL East-champion Nationals have lost two of three to the last-place Diamondbacks and seven of their last 11 games overall.

Miller (3-12) capped an otherwise forgetful season with one of his best outings of the year, allowing five hits with one walk and striking out five to earn his first win since June 20.

Gio Gonzalez (11-11), Washington’s projected No. 3 starter in the NL Division Series against the Los Angeles Dodgers, struggled in his final tune up before the postseason.


CHICAGO — Todd Frazier hit his 40th home run, Miguel Gonzalez waited out a rain delay to throw 8 1/3 dominant innings and Chicago beat Tampa Bay.

Frazier set a career high and became the seventh White Sox player to reach the homer milestone when he connected off knuckleballer Eddie Gamboa (0-2) with two out in the seventh. Frazier is hitting .391 (18 for 46) during a 12-game hitting streak.

Gonzalez (5-7) returned after a 1 hour, 16-minute delay in the third inning and retired 18 of 19 before being lifted after Logan Forsythe’s one-out single to left in the ninth. David Robertson got the final two outs for his 37th save in 44 tries.

The game also was delayed 21 minutes before the start. It was 57 degrees at first pitch and rain came and went amid blustery conditions as a tiny crowd watched Chicago win its fifth straight. The game itself lasted only 2 hours, 10 minutes.


ATLANTA — Matt Kemp hit a two-run homer, Daniel Castro had three RBIs and Dansby Swanson also drove in two runs, leading Atlanta past Philadelphia.

Mike Foltynewicz (9-5) pitched two-hit ball over five innings in his first start since Sept. 12, when he left a game against Miami with a left calf contusion.

The Braves won for the ninth time in their last 10 games. They have 21 victories in 34 games since Aug. 21, bouncing back from a dismal start.

Adam Morgan (2-11) lasted five innings, giving up 10 hits and nine runs.


ANAHEIM, Calif. — Kole Calhoun homered, Alex Meyer earned his second major league win and Los Angeles held off a late rally from Oakland to sweep the three-game series.

Meyer (2-3) limited the A’s to two runs and five hits over four innings. J.C. Ramirez pitched a perfect ninth to convert his second save.

Mike Trout was hit by a John Axford fastball in the back of his left shoulder in the eighth inning and was removed from the game.

Ross Detwiler (3-3) took the loss.