BOSTON -- Dustin Pedroia delivered a game-tying, two-run double in the seventh inning, and pinch hitter Mike Carp came through with an RBI single an inning later as the Boston Red Sox came from behind to win their fourth straight game, 4-3 over the Baltimore Orioles on Wednesday night.
John Lackey pitched into the eighth inning and Jacoby Ellsbury had two hits and two stolen bases for the Red Sox, who won for the seventh time in their last 10 games to maintain a 2 1/2-game lead over the Tampa Bay Rays for first place in the American League East.
Chris Davis hit his major-league-leading 47th home run of the season, and Manny Machado also went deep for the Orioles, who lost for the third time in four games to fall 7 1/2 games behind Boston.
The Red Sox were held in check by Bud Norris until they broke through against Baltimore's bullpen in the seventh.
Francisco Rodriguez surrendered a leadoff double to Stephen Drew and a single to Ellsbury. Darren O'Day came in and got Shane Victorino to line out before yielding Pedroia's double to left that barely scored Ellsbury from second, tying the game 3-3.
The Red Sox then strung together a two-out rally against Tommy Hunter (3-3) in the eighth.
Jarrod Saltalamacchia doubled off the Green Monster and later scored on Carp's flare that barely sailed over the outstretched arm of third baseman Machado.
Koji Uehara pitched a perfect ninth for his 14th save in 17 opportunities.
Lackey kept the Red Sox in the game by holding the Orioles to three runs on seven hits over 7 1/3 innings, striking out four and walking one.
Craig Breslow (4-2) pitched two-thirds of an inning for the win.
One night after scoring 13 runs on 14 hits, Boston was silenced by Norris.
Acquired at the trade deadline from Houston, the right-hander surrendered one run on four hits over 5 1/3 innings with seven strikeouts and four walks.
Baltimore took a 1-0 lead in the first when Machado beat out an infield single and scored on a double by Davis.
Machado then made it 2-0 in the third with his 12th homer of the year, belting an 0-1 offering from Lackey over the Green Monster in left field.
The Red Sox cut the deficit in half in the bottom of the third on an RBI single by Victorino, who drove in a career-high seven runs Tuesday. Norris preserved the lead, though, working out of a bases-loaded jam by striking out David Ortiz and Daniel Nava to end the threat.
Davis, who had hit only two homers in his last 11 games, led off the sixth with a solo shot to center, his fifth against Boston this season.
NOTES: Sean Collier, an MIT police officer who was killed in April, allegedly by the Boston Marathon bombing suspects, was honored during the ceremonial first pitch. Nine members of his family threw out pitches to Red Sox players. ... Boston RHP Clay Buchholz, on the 60-day disabled list with a neck strain, will make his second rehab start Friday for Triple-A Pawtucket. He will throw 50 to 55 pitches before possibly returning to Boston to rejoin the rotation, according to Red Sox manager John Farrell. ... Baltimore RHP Chris Tillman (14-4, 3.66) will face Boston LHP Jon Lester (12-7, 3.97) Thursday in the finale of the three-game series. ... Red Sox INF Xander Bogaerts made his first career start at Fenway Park. He played third base and went 0-for-3. ... In need of a reliever, Baltimore called up RHP Kevin Gausman and sent LHP Wei-Yin Chen to the rookie-level Gulf Coast League. Orioles manager Buck Showalter said Chen, who was tagged for eight runs over 3 2/3 innings in the worst start of his career Tuesday, will return to the majors and pitch Sunday against the New York Yankees.