BALTIMORE -- Held hitless by Aaron Cook through five innings, the Baltimore Orioles sent 10 batters to the plate during a five-run sixth and beat the Boston Red Sox 5-3 Wednesday night.
Baltimore trailed 2-0 before rallying against Cook, who fueled the uprising with a throwing error on a potential inning-ending, double-play comebacker. The miscue led to three unearned runs and saddled Cook (3-6) with his fourth loss in five starts.
Rookie Miguel Gonzalez (5-2) allowed two runs and six hits in six innings to help the Orioles (64-53) secure their ninth win in 11 games and move a game ahead of Tampa Bay for the top AL wild-card spot.
Jim Johnson worked the ninth for his 35th save in 38 tries. The game ended with rookie third baseman Manny Machado making a diving stab of Nick Punto's liner down the line.
Carl Crawford had two RBI for the Sox, who have lost six of eight to fall four games under .500 (57-61) for the first time since May 13. Cleanup hitter Adrian Gonzalez and manager Bobby Valentine were both ejected in the eighth inning for arguing with home plate umpire Mike Everitt.
Cook was unhittable through five innings, allowing only a pair of walks and getting 13 of 15 outs on grounders. He got the first out in the sixth on a groundball, and then the trouble began.
Nick Markakis walked and J.J. Hardy lined a single to left. Nate McLouth hit an RBI single, and with runners on the corners Adam Jones hit a bouncer to Cook, who threw wildly to second.
Andrew Miller got Chris Davis to hit a grounder to drawn-in second baseman Dustin Pedroia, who threw home. Jones lowered his left shoulder and ran hard into catcher Jarrod Saltalamacchia, who applied the tag for the second out. But Mark Reynolds followed with a two-run double off Junichi Tazawa for a 5-2 lead.
Crawford got Boston to 5-3 in the seventh with a run-scoring groundout, but Boston went down in order in the eighth and ninth.
The Red Sox are 3-8 against Baltimore this season and have lost five of the last six series between the teams dating to last season.
Limited to two singles and a walk through four innings, Boston grabbed a 2-0 lead in the fifth. After Scott Podsednik and Punto singled, Jacoby Ellsbury doubled in a run and Crawford followed with a sacrifice fly.