The host Red Sox, who at 64-78 are not in playoff contention this season, won in the ninth inning on Jacoby Ellsbury’s run-scoring single, his fourth hit of the game.
The loss left the Yankees and Orioles, who won 9-2 at home against the Tampa Bay Rays, tied for the division lead at 79-62.
Dustin Pedroia drove in two runs for the Red Sox with a run-scoring single and a solo home run. Derek Jeter had a two- run double for the Yankees.
J.J. Hardy drove in five runs for the Orioles with a pair of two-run homers and a run-scoring single. He also had a double at Oriole Park at Camden Yards.
The Rays are two games behind the Yankees and Orioles in the AL East, and also are two games back in the race for the AL wild card. The Oakland Athletics (81-60) are atop the AL wild- card standings after beating the Los Angeles Angels 6-5 last night. The top two non-division winners in each league earn wild-card spots in the postseason.
The Detroit Tigers won 5-3 at the White Sox to pull within two games of Chicago in the AL Central. Austin Jackson and Miguel Cabrera homered for the Tigers.
In the National League, East division leader Washington won 5-3 at the Mets as New York pitcher R.A. Dickey allowed three runs in seven innings to drop his record to 18-5 this season. The Mets have lost five straight games.
Central leader Cincinnati won 5-3 at home against the Pittsburgh Pirates, who lost their fifth straight game.
To contact the reporter on this story: Rob Gloster in San Francisco at firstname.lastname@example.org
To contact the editor responsible for this story: Michael Sillup at email@example.com