BALTIMORE – Chris Davis and Manny Machado each connected twice as Baltimore tied a team record with seven home runs, routing Toronto 12-2 Wednesday night and staying within 1½ games of the AL East lead.

The Orioles ended a two-game losing skid against the Blue Jays and remained 1½ games behind the division-leading New York Yankees, who won 8-2 in Minnesota.

Nate McLouth hit a leadoff shot in the first inning, and Jim Thome and Mark Reynolds also homered. Baltimore has hit seven home runs three times, most recently on Aug. 26, 1985.

YANKEES 8, TWINS 2: CC Sabathia struck out 10 batters over eight innings as New York won at Minneapolis to stay 1½ games ahead of Baltimore. Sabathia (14-6) threw 89 of his 118 pitches for strikes.

TIGERS 5, ROYALS 4: Jhonny Peralta brought home the go-ahead run when Andy Dirks’ hard slide broke up a potential inning-ending double play in the eighth at Detroit.

NATIONAL LEAGUE

NATIONALS 8, PHILLIES 4: Bryce Harper hit his 20th homer, and Ian Desmond and Kurt Suzuki also connected as the visiting Nationals moved closer to winning their first division title since moving to Washington.

John Lannan (4-0) gave up two runs and five hits in 5 1/3 innings to win his second start since taking Stephen Strasburg’s spot in the rotation.

INDIANS 6, WHITE SOX 4: Chicago’s loss at home puts it a full game behind Detroit for first place in the AL Central.

BREWERS 8, REDS 1: Ryan Braun hit his NL-leading 41st home run as visiting Milwaukee kept its wild-card chances flickering. Combined with a St. Louis loss, the Brewers are 3½ games behind the Cards for the final NL wild-card spot.

BRAVES 3, MARLINS 0: Atlanta showed no hangover from its champagne celebration for clinching a playoff spot a day earlier, as Martin Prado homered and Paul Maholm combined with three relievers on a six-hitter at Atlanta.

DODGERS 8, PADRES 2: Matt Kemp had four hits and four RBI as Los Angeles won at San Diego to keep its slim playoff hopes alive.

ASTROS 2, CARDINALS 0: Bud Norris (6-13) pitched into the eighth inning for his first win since May 21, and Jose Altuve homered as the Astros avoided a sweep in Houston.

METS 6, PIRATES 0: Ruben Tejada tied a career high with four hits and the Mets took advantage of Pittsburgh’s shoddy defense at New York.

NOTES

METS: David Wright’s infield single in the third inning against Pittsburgh was his 1,419th hit, snapping a tie with Ed Kranepool atop the team’s career list.

MARLINS: Manager Ozzie Guillen said he had no problem with the Braves celebrating after clinching at least a wild-card spot Tuesday night. “Everybody should celebrate everything they do in life,” Guillen said.

YANKEES: Manager Joe Girardi left open the possibility of injured first baseman Mark Teixeira returning this weekend in Toronto.