TORONTO — Hyun Soo Kim hit a pinch two-run homer in the ninth inning off Roberto Osuna, and the Baltimore Orioles beat Toronto 3-2 on Wednesday night 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, causing the Orioles relievers to jump in celebration.

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

Mark Trumbo hit his major league-leading 46th home run, a solo drive off Jason Grilli in the eighth. Sacrifice flies by Edgar Encarnacion in the first and Kevin Pillar in the second had built a 2-0 lead for Toronto.

Brian Duensing (1-0) got one out, and Zach Britton finished for his 47th save in as many tries.

Blue Jays left-hander Francisco Liriano struck out 10 over six shutout innings. Toronto starters have allowed one earned run or none in a team-record seven straight games.

MARINERS 12, ASTROS 4: Robinson Cano hit a three-run homer in the first inning as visiting Seattle kept the pressure on the other AL wild-card contenders.

Cano has nine homers and 25 RBI in 19 games against Houston this season.

TIGERS 6, INDIANS 3: Miguel Cabrera hit a tiebreaking three-run homer in the fifth inning, moments before the game was halted for good, as host Detroit came away with a rain-shortened win to keep pace with Baltimore in the AL wild-card race.

ROYALS 5, TWINS 2: Kendrys Morales and Alex Gordon keyed an eighth-inning rally as Kansas City won at home, but was still knocked out of playoff contention when Baltimore beat Toronto.

NATIONAL LEAGUE

METS 5, MARLINS 2: Jay Bruce hit his 32nd home run and James Loney also homered as New York helped its wild-card chances with a win at Miami.

The Marlins’ loss in their home finale eliminated them from playoff contention.

PIRATES 8, CUBS 4: John Jaso hit for the cycle in just four at-bats and drove in five runs to lead Pittsburgh to a win at home.

Jaso tripled off Chicago reliever Pedro Strop in the seventh inning to clinch the first cycle in the history of PNC Park and the first for the Pirates since 2004.

DIAMONDBACKS 3, NATIONALS 0: Shelby Miller threw five shutout innings and Jean Segura had three hits to reach 200 for the season as Arizona won a rain-shortened game at Washington.

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

BRAVES 12, PHILLIES 2: Matt Kemp hit a two-run homer and Daniel Castro drove in three runs as surging Atlanta won at home.

The Braves won for the ninth time in their last 10 games, building some momentum for 2017 and their move to SunTrust Park. They have 21 victories in 34 games since Aug. 21.

REDS 2, CARDINALS 1: Adam Duvall’s two-run single was all Cincinnati needed as the Reds won at St. Louis, dealing a blow to the Cardinals’ playoff hopes.

INTERLEAGUE

RANGERS 8, BREWERS 5: Carlos Gomez hit a towering three-run homer in the eighth inning as AL-leading Texas got its MLB-best 49th come-from-behind victory with a win at home.

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