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

The Orioles ended a two-game losing skid against the Blue Jays and remained close to 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.

Davis finished with a career-high five RBIs.

The Orioles trailed 2-1 heading into the bottom of the fifth before hitting three home runs.

Thome led off with his third homer since joining the Orioles and the 612th of his career. With two outs, Machado hit his fifth of the year for a 3-2 Baltimore lead. All of Machado's home runs have come at home, and his drive was the Orioles' 200th homer of the year.

Davis' three-run drive gave the Orioles a five-run inning and finished Carlos Villanueva (7-7).

Villanueva equaled a career-high by giving up four home runs.

Davis hit his second home run in the seventh. On Aug. 24, he hit three home runs against the Blue Jays, also in a game started by Villanueva. He has 28 home runs.

Reynolds hit his 23rd homer in the sixth and Machado added a two-run shot in the eighth.

Miguel Gonzalez (8-4) allowed two runs and five hits in seven innings. He allowed Edwin Encarnacion's 42nd home run with two outs in the top of the first.

With one out in the fifth, J.P. Arencibia, who went 7 for 9 in the four-game series, doubled and scored on Anthony Gose's single.

Notes: Orioles LHP Randy Wolf was put on the 60-day disabled list with a torn ligament in his left elbow. Baltimore purchased the contract of INF-OF Bill Hall from Triple-A Norfolk. Hall will provide outfield help while Lew Ford is out with a groin injury. ... Deion Sanders, in town for Thursday's NFL Network game between the Cleveland Browns and Baltimore Ravens, took batting practice with the Orioles before the game. Sanders, who played nine years in the majors, was an outfielder for Baltimore manager Buck Showalter in the minors while in the Yankees' organization. ... The Orioles are off Thursday and begin a three-game series with Boston on Friday. Baltimore RHP Chris Tillman (8-2, 3.08 ERA) faces Red Sox RHP Aaron Cook (4-10, 5.13). ... On Thursday, Toronto hosts New York to begin a four-game series. Blue Jays RHP Brandon Morrow (8-7, 3.28) faces Yankees RHP Ivan Nova (12-7, 4.94).