But Danny Valencia ended that streak with a triple to lead off the ninth, Matt Wieters' hit a go-ahead sacrifice fly and the Orioles beat the Red Sox 3-2 on Tuesday night to stay two games behind in the AL wild-card race.
"They were real frustrated that we didn't make a couple of plays that we normally made," Baltimore manager Buck Showalter said, "but the bullpen was really good. Scotty bent but didn't break.
"You don't like your chances there with Koji, but we got a big hit from Danny."
Despite the loss, Boston's magic number to clinch the AL East dropped to three when Tampa Bay lost to Texas 7-1.
"I'm excited," Davis said. "I've said it all along. When you're hitting homers and your team's not winning it feels like it's kind of for nothing. So I was obviously glad to tie the game."
The homer came off starter Ryan Dempster, who allowed three hits in six innings.
"He just lifted that ball and got it up in the air -- way, way, way up in the air -- and it just kept carrying," Dempster said.
Uehara (4-1) fell four outs short of Bobby Jenks' major league record for a reliever of 41 consecutive retired batters set in 2007 and Mark Buehrle's mark for all pitchers of 45 in 2009. The run was the first off Uehara in 30 2/3 innings and ended a streak of 27 scoreless outings since July 9.
"I wasn't aware of it," Valencia said, "but I'm not surprised by it because he's got great stuff."
Valencia led off the ninth with a triple to center and pinch-runner Alexi Casilla scored easily on Wieters' fly to right.
"Koji's been so good for us," Boston manager John Farrell said. "Even after the run allowed, he continued to pitch as he has. It didn't faze him and he finished out the inning."
The Orioles threatened in the eighth when Nate McLouth singled and took third on Manny Machado's AL-leading 51st double with no outs. But Craig Breslow replaced Brandon Workman and needed just six pitches to get out of the jam. With the infield in, he got Davis and Adam Jones to ground out to shortstop Stephen Drew as the runners held then retired Nick Markakis on a fly to left.
The Red Sox took a 1-0 lead on Pedroia's ninth homer of the season. Left fielder McLouth didn't even move as it went deep into the seats above the Green Monster.
They made it 2-0 in the fourth with the help of two errors by a team that had made just 43 all year.
With one out and third baseman Machado playing in short right field on the shift for Saltalamacchia, he charged a hard grounder and let it get by him for an error. Drew then walked before a double steal put runners at second and third. Xander Bogaerts followed with a low liner to left field that McLouth charged. The ball hit off his glove for an error and Saltalamacchia scored. Bogaerts was credited with a sacrifice fly.
Machado made a throwing error in the seventh on a grounder down the line by Pedroia.
The Orioles made it 2-1 in the fifth when Valencia walked, took third on a double by J.J. Hardy and scored on a groundout by Roberts.
The Red Sox stole three bases and have been successful in their last 35 attempts. ... Baltimore's total of errorless games remained at 113, tied with Houston's total in 2008 for the most since 1900. ... Wei-Yin Chin (7-7) pitches for Baltimore against Jake Peavy (3-1) in the second game of the three-game series Wednesday night. ... The Red Sox recalled IF Brock Holt, and RHPs Brayan Villarreal and Steven Wright from Triple-A Pawtucket.
Atlanta looks to extend NLCS lead over Los Angeles in Game 4
Atlanta Braves (88-73, first in the NL East) vs. Los Angeles Dodgers (106-56, second in the NL West)
Red Sox will face Astros in Game 5 of ALCS
Houston Astros (95-67, first in the AL West) vs. Boston Red Sox (92-70, second in the AL East)
Jose Altuve, Jason Castro key Houston Astros' late rally to rout Boston Red Sox in Game 4 of ALCS
Jose Altuve started the Astros' comeback with a home run in the eighth, and Houston stunned the Red Sox with seven runs in the ninth to win Game 4 of the ALCS on Tuesday night.
MLB playoffs 2021- How the 268th pitch became the defining moment of ALCS Game 4
Nathan Eovaldi thought he executed a pitch that got the Red Sox out of a ninth-inning jam. Umpire Laz Diaz did not. How long that's remembered in Boston depends on what happens next.
Nathan Eovaldi, Boston Red Sox take issue with pivotal ball-strike call in loss to Houston Astros
Nathan Eovaldi and the Red Sox took issue with a ninth-inning ball-strike call that allowed the Astros to go on a run and win Game 4 of the ALCS on Tuesday night.
Astros awaken for 7 in 9th, beat Boston 9-2 to tie ALCS 2-2
— Six outs from falling behind 3-1 in the AL Championship Series and facing elimination in Game 5 in Boston — where the Red Sox had yet to lose this postseason — the Houston Astros offense awakened.