BALTIMORE – Ryan Flaherty of Portland hit a pair of two-run homers, Jonathan Schoop had a solo shot in his big league debut and the Baltimore Orioles beat the Toronto Blue Jays 9-5 on Wednesday night to snap a six-game skid and clinch their second straight winning season.

Steve Pearce also homered for Baltimore and Chris Davis doubled in a run to increase his RBI total to 137 — tied with Miguel Cabrera for the major league lead.

The Orioles were eliminated from playoff contention one night earlier, so Manager Buck Showalter rested Adam Jones, Brian Roberts and Matt Wieters, and moved Davis from first base to designated hitter.

With a lineup that included Jason Pridie, Schoop and Steve Clevenger, the Orioles ended a streak of 21 straight games of scoring five runs or fewer. Schoop, a 21-year-old prospect, contributed two hits — including the homer in the sixth — and scored three runs.

INDIANS 7, WHITE SOX 2: Rookie Danny Salazar gave Cleveland a much-needed quality start and Nick Swisher hit a two-run homer as host Cleveland won its 14th straight over Chicago.

Salazar (2-3) struck out eight in 51/3 innings for the Indians, who won their final six home games to stay with the wild-card leaders. They have a one-game lead over Texas in the wild-card chase and are also one game behind Tampa Bay for the top spot with just four games left.

RAYS 8, YANKEES 3: New York failed to make the playoffs for only the second time in 19 years, getting mathematically eliminated during its home loss to Tampa Bay.

Evan Longoria homered twice as the Rays won their sixth straight and lowered to three their magic number over Texas for clinching an AL wild-card berth.

RANGERS 7, ASTROS 3: Leonys Martin hit a three-run double and Ian Kinsler homered as Texas handed visiting Houston its team-record 108th loss of the season.

Texas completed a three-game sweep and finished 17-2 with 11 straight wins against its instate rival.

TIGERS 1, TWINS 0: Max Scherzer earned his 21st win and visiting Detroit clinched its third straight AL Central title by beating Minnesota.

Torii Hunter’s single followed a leadoff triple by Austin Jackson in the first inning, and that was all Scherzer (21-3) and the Tigers needed to start the party.

ANGELS 3, ATHLETICS 1: Jered Weaver pitched seven innings of five-hit ball, Josh Hamilton drove in two runs, and Los Angeles topped visiting Oakland.

NATIONAL LEAGUE

CARDINALS 4, NATIONALS 1: Rookie Shelby Miller won his 15th game and Yadier Molina had the go-ahead hit as St. Louis wrapped up a three-game sweep of visiting Washington.

The Cardinals lead the Pirates in the NL Central by three games with three games to go.

CUBS 4, PIRATES 2: Darnell McDonald launched a three-run homer, leading Chicago over visiting Pittsburgh.

The Pirates, who already have clinched a playoff spot, hold a one-game lead over Cincinnati for the first wild-card slot. Pittsburgh and the Reds finish up with a three-game set in Cincinnati this weekend.

METS 1, REDS 0: Daisuke Matsuzaka scattered four hits in 72/3 shutout innings to win his third consecutive start, outdueling Cincinnati’s Mat Latos in New York’s win at Cincinnati.

MARLINS 3, PHILLIES 2: Adeiny Hechavarria drove in three runs, including a go-ahead run in the eighth inning, to help Miami beat visiting Philadelphia.

BREWERS 4, BRAVES 0: Kyle Lohse pitched a two-hitter as Milwaukee won at Atlanta.