Second baseman Eliot Johnson's errant throw to home plate that led to two runs in the seventh inning helped the Yankees win for the fifth time in 15 games.
New York sat atop the division standings by itself for 84 consecutive days — its longest streak since 2004 — until Tuesday night's loss to Tampa Bay dropped the Yankees into a tie with Baltimore. They moved back into first place when the Orioles lost to Toronto.
New York, which held a team meeting before the game, leads the third-place Rays by 2 1/2 games.
With the score tied at 4, Andruw Jones and Steve Pearce singled to start the seventh off Matt Moore (10-9) before Jayson Nix moved the runners up with a bunt. Derek Jeter, who had hits in his previous three at-bats, hit a grounder to Johnson. With the infield playing in, his throw was off the mark, allowing the Yankees to take a 6-4 lead.
Luke Scott homered off winner Hirkoi Kuroda (13-10). Rafael Soriano pitched the ninth for his 36th save.
Tampa Bay had won four in a row.
BLUE JAYS 6, ORIOLES 4
TORONTO (AP) — Blue Jays rookie Adeiny Hechavarria drove in the go-ahead run with a bunt single, Rajai Davis homered and had three RBIs and Toronto beat Baltimore to avoid a three-game sweep.
Steve Delabar (4-1) worked one inning of relief for the win as the Blue Jays snapped a four-game slide and ended Baltimore's winning streak at three.
Adam Jones hit a solo home run and Mark Reynolds added a two-run drive off Casey Janssen in the ninth, his sixth in six games and 18th of the season, but it wasn't enough for Baltimore.
The Orioles return home Thursday for a pivotal seven-game homestand that begins with four against the Yankees, followed by three against Tampa Bay.
Miguel Gonzalez (6-4) gave up five runs, four earned, and seven hits in 6 1-3 innings.
RANGERS 7, ROYALS 6
KANSAS CITY, Mo. (AP) — Adrian Beltre hit a three-run homer, Michael Young also went deep and Texas held on to beat Kansas City.
Ryan Dempster (5-1) of Gibsons, B.C., gave up RBI doubles to Billy Butler in the first inning and Salvador Perez in the sixth, but was otherwise stingy for the AL West-leading Rangers. He only allowed two other hits in six innings, striking out eight to win his fourth straight game.
Beltre's homer came off Everett Teaford (1-4), who was making his fifth start of the year. Young's solo shot came off Vin Mazzaro during a three-run seventh.
The runs proved handy when Kansas City mounted a late comeback. Alcides Escobar's RBI single off Joe Nathan put the potential tying run on first with two outs in the ninth, but Alex Gordon flied out to end the game. It was Nathan's 27th consecutive save and 28th in 29 chances this season.
Ian Kinsler, Elvis Andrus and Nelson Cruz also drove in runs to help the Rangers (81-55) take a five-game lead in the division. The win also moved them a season-high 26 games above .500, and assures a club-record fourth consecutive season of .500 or better.
WHITE SOX 6, TWINS 2
CHICAGO (AP) — Alex Rios homered twice and drove in a career-high six runs to lead the White Sox over Minnesota.
Rios hit a grand slam in the first inning off P.J. Walters (2-3) and a two-run shot in the sixth to help Chicago maintain its one-game lead in the AL Central over Detroit.
The Twins scored 18 runs against Chicago pitching Tuesday, but White Sox starter Jake Peavy (10-10) silenced Minnesota's bats a day later, allowing one run and six hits to win for the first time since Aug. 1.
TIGERS 7, INDIANS 1
DETROIT (AP) — Miguel Cabrera hit a two-run homer in the first inning and Prince Fielder added a solo shot in the eighth to help Detroit avoid a three-game sweep with a victory over Cleveland.
Doug Fister (8-8) allowed a run and four hits in seven innings for the Tigers. He struck out six and walked one.
Ubaldo Jimenez (9-15) gave up four runs and six hits in 7 1-3 innings. He was generally sharp after allowing Cabrera's 35th homer of the year, but Detroit tacked on five more runs in the eighth to break it open.
ANGELS 7, ATHLETICS 1
OAKLAND, Calif. (AP) — Torii Hunter drove in three runs and Los Angeles completed a three-game sweep after Oakland pitcher Brandon McCarthy took a liner off his head in the fourth inning.
McCarthy (8-6) was sent to the hospital after he was struck by a ball off Erick Aybar's bat. The team said he never lost consciousness and was doing well, but doctors wanted him to stay overnight for further observation and he would not travel with the team to Seattle on Thursday.
Howie Kendrick doubled and hit a two-run single to help the Angels pull within 2 1/2 games of Oakland for one of two AL wild-card spots. Dan Haren (10-10) allowed one run and three hits in six innings.
The Angels outscored Oakland 21-5 in the series. Los Angeles (74-63) has won eight of nine to move a season-best 11 games over .500.
MARINERS 2, RED SOX 1
SEATTLE (AP) — Kevin Millwood pitched six stingy innings to win for the first time in 5 1/2 weeks and Seattle handed the staggering Boston Red Sox their eighth defeat in nine games.
Dustin Ackley hit a two-run single in the fourth to back Millwood (5-12), who allowed four hits and one run in his first victory since July 28. The right-hander had gone 1-8 since May 21.
Tom Wilhelmsen worked the ninth for his 24th save in 27 opportunities as the last-place Mariners (67-71) won for the 11th time in 14 home games and matched their win total from last season with 24 games remaining.
Aaron Cook (3-9) went six innings for Boston, giving up seven hits. He is 1-8 since tossing a two-hit shutout against Seattle on June 29.